Re: [sqlite] Importing data into SQLite

2009-09-24 Thread TTTTT
You can use the sqlite binary to import data from a CSV file - if you do it that way you have to make sure that your data fields in the SQLite database match exactly in order the data in the CSV file. That's been my experience. The other way is to do it programmatically (Java, C++, etc). The adv

Re: [sqlite] SQL Lite date / time functions

2009-09-24 Thread Alexey Pechnikov
Hello! On Thursday 24 September 2009 05:54:12 Dan Bishop wrote: > > Can you add this note to documentation? This is very speculate question. > > Especially because internal SQLite representation of julianday was chanded > > some times ago. > It's not a date-specific issue; the same thing occurs wi

Re: [sqlite] Importing data into SQLite

2009-09-24 Thread Dan Bishop
T wrote: > > You can use the sqlite binary to import data from a CSV file - if you do it > that way you have to make sure that your data fields in the SQLite database > match exactly in order the data in the CSV file. That's been my experience. > The other way is to do it programmatically (Java

Re: [sqlite] Sqlite profiler

2009-09-24 Thread Jim "Jed" Dodgen
how would your profiler differ from "explain"? http://sqlite.org/lang_explain.html On Wed, Sep 23, 2009 at 6:32 AM, Christian Schwarz wrote: >> Maybe, what is it? > > http://en.wikipedia.org/wiki/Profiling_(computer_programming) > > Cheers, Christian > ___

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-24 Thread CityDev
Thanks for that Sebastian. It does however surprise me. I believe Access Jet handles simultaneous activities. Indeed I've got a feeling it does row-locking rather than page-locking. It's odd that SQLite has such a limitation. Anyway, you've saved me a lot of heartache. -- View this message in c

[sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread Adam Panayis
Hi, are there plans to stop sqlite3 from reading in all column data on specific select queries? i.e I would like sqlite to ONLY read column data for columns which are specified in the select and where clauses. Thanks. Adam. ___ sqlite-users mailing li

[sqlite] FTS3 phantom token?...

2009-09-24 Thread Shopsland gmail
Hi, Mining my fts3 table stemmed with Porter I found that there is a 'phantom' token indexed by fts3. When I issue this query: select title from fts_news where fts_news match 'ined' I got about 700 rows that do not have the word 'ined' in any form (ie: ined or inedible). If I issue those que

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread Griggs, Donald
Hello, Adam, Regarding: "... are there plans to stop sqlite3 from reading in all column data on specific select queries? i.e I would like sqlite to ONLY read column data for columns which are specified in the select and where clauses." I'm no sqlite expert, and moreover I'm not sure I understand

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread Igor Tandetnik
Adam Panayis wrote: > Hi, are there plans to stop sqlite3 from reading in all column data on > specific select queries? i.e I would like sqlite to ONLY read column > data for columns which are specified in the select and where clauses. What do you mean by "reading in" here? I'm not sure I understa

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread D. Richard Hipp
On Sep 24, 2009, at 8:42 AM, Adam Panayis wrote: > Hi, are there plans to stop sqlite3 from reading in all column data on > specific select queries? i.e I would like sqlite to ONLY read column > data for columns which are specified in the select and where clauses. Short answer: Already does tha

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-24 Thread Kosenko Max
Mark Parker-4 wrote: > This isn't an "SSD". It's connected directly to the PCI Express bus, and > "low cost" it certainly is NOT. It's much more valuable than the server > it's plugged into. Check page size. It might be less than cluster of your ioExtreme. You should also think about actually t

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread Martin Pfeifle
Hi Richard, assume I have a table mytable (id, blob1,blob2,blob3,blob4) where each blob extends over several pages. Then I do the following SQL command: select blob4 from mytable where id = 4711 Do I understand you correctly that in the case autuvacuum =true, the pages covered by blob1 to blob

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread D. Richard Hipp
On Sep 24, 2009, at 2:09 PM, Martin Pfeifle wrote: > Hi Richard, > > assume I have a table mytable (id, blob1,blob2,blob3,blob4) > where each blob extends over several pages. > > Then I do the following SQL command: > select blob4 from mytable where id = 4711 > > Do I understand you correctly tha

[sqlite] Tedious CSV import question

2009-09-24 Thread C. Mundi
Hi. I have scanned the list archives and Googled. I may have missed something, but what I found was not sufficiently general or robust for my needs. Happily, sqlite has a very nice .output mode for CSV. It correctly double-quotes fields when they contain a space or a comma, and it correctly 'es

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Wilson, Ronald
Sadly, the sqlite3 command line does not handle quoted fields when importing CSV very well at all. Commas inside quotes get treated as column separators, and newlines inside quotes get treated as row separators. I had this problem earlier this year and ended up using excel to create insert sta

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Simon Slavin
On 24 Sep 2009, at 8:37pm, C. Mundi wrote: > Happily, sqlite has a very nice .output mode for CSV. It correctly > double-quotes fields when they contain a space or a comma, and it > correctly > 'escapes' double-quote literals as "". Great! I need to go the > other way. > > I don't see an i

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread J Glassy
On c.Mundi's CSV inquiry, One way I (interactively) address the need to import CSV data into sqlite databases is to use Mrinal Kant's SQL Manager add-in. This offers what I believe are more robust facilities for performing this type of bulk import. I'm not sure if SQL Manager is an option for you

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Fred Williams
Try this: http://sqliteadmin.orbmu2k.de/ Works great for me. Fred -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of J Glassy Sent: Thursday, September 24, 2009 3:16 PM To: General Discussion of SQLite Database Subject: Re: [sql

Re: [sqlite] Sqlite profiler

2009-09-24 Thread mcnamaragio
I am thinking about developing a profiler but I am at a very early stage. I have only ideas and nothing more yet. Before I start actual coding I would like to know if anyone is interested in it as it will motivate me if I know that people will benefit from the tool. I am not sure whether I will b

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Jimmy Verner
I had a lot of trouble with trying to import into SQL Manager from csv files. Per some earlier advice, I began inputting through the console instead. But I did figure out a way to cut down on the time. I've been making cookie-cutter iPhone apps (a series of rules of legal procedure where

[sqlite] Perl DBI/Sqlite Attach too much memory

2009-09-24 Thread John Lynch
Sqlite Users, I am using sqliute user for a very large customer database. I have 3 seperate DB files with a table in each file. The files are cust,acct, and web. Each DB table has ~ 200 Million Rows. When I attach web and acct to cust with perl DBI/DBD::Sqlite the process runs out of memory o

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Simon Slavin
On 24 Sep 2009, at 10:24pm, Jimmy Verner wrote: > I've attached a file with a few rows so you can see what I'm talking > about. Attachments don't work on this list (we don't all want huge files clogging up our interweb tubes) but your description is clear and the technique is clever. Simo

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Jay A. Kreibich
On Thu, Sep 24, 2009 at 09:12:20PM +0100, Simon Slavin scratched on the wall: > The .import command does not handle quoted fields correctly, as has > recently been stated on this list. I think it would be more fair to say that the .import command has chosen not to support quoted fields.

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Petite Abeille
On Sep 24, 2009, at 11:47 PM, Jay A. Kreibich wrote: > The bigger issue is that CSV isn't really a format, but more of a > loose idea. Right, that said, sticking to RFC 4180 is not such a bad bet: Common Format and MIME Type for Comma-Separated Values (CSV) Files http://www.rfc-editor.org/rfc/

Re: [sqlite] Sqlite reading all column data on selects.

2009-09-24 Thread Wolfgang Enzinger
Am Thu, 24 Sep 2009 14:18:33 -0400 schrieb D. Richard Hipp: > When autovacuum=FULL or autovacuum=INCREMENTAL and SQLite needs to > seek to the end of a long chain of overflow pages, it attempts to use > the "pointer map pages" that are available in these modes to locate > the pages without a

[sqlite] sqlite3_column_type bad value

2009-09-24 Thread Sebastian Bermudez
i have 1 table: create table t1 ( id integer not null primary key, descri text ) then i exec... "SELECT * FROM t1" when i get the column type... with [ sqlite3_column_type(stmt,index); ] i get always (int)5 = SQLITE_NULL every else is correct !, i have the correct row count, field count; value

[sqlite] Ok. I found the error

2009-09-24 Thread Sebastian Bermudez
i can't call sqlite3_column_type before sqlite3_step !! from sqlite.org: "...If the SQL statement does not currently point to a valid row, or if the column index is out of range, the result is undefined. These routines may only be called when the most recent call to sqlite3_step() has returned S

Re: [sqlite] sqlite3_column_type bad value

2009-09-24 Thread Igor Tandetnik
Sebastian Bermudez wrote: > sqlite3_open > sqlite3_prepare ( "select * from t1" ) > get sqlite3_column_count(stmt) > for 1 to colcount > sqlite3_column_type(stmt,index) "always return 5" > next You need to call sqlite3_step first. sqlite3_column_type examines actual data in an actual row, but

Re: [sqlite] Sqlite profiler

2009-09-24 Thread George Bills
On 09/23/2009 11:16 PM, mcnamaragio wrote: > Hello, > > Would anyone be interested in sqlite profiler? If yes what features would > you expect from it? > > Thank you. > Yes, I would be interested. A high level breakdown of what SQLite is doing, and the time it's taking to do it would be useful

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread BareFeet
On 25/09/2009, at 7:47 AM, Jay A. Kreibich wrote: > On Thu, Sep 24, 2009 at 09:12:20PM +0100, Simon Slavin scratched on > the wall: > >> The .import command does not handle quoted fields correctly, as has >> recently been stated on this list. > > I think it would be more fair to say that the .i

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread C. Mundi
On Thu, Sep 24, 2009 at 12:37 PM, C. Mundi wrote: > > Hi. I have scanned the list archives and Googled. I may have missed > something, but what I found was not sufficiently general or robust for my > needs. > > Happily, sqlite has a very nice .output mode for CSV. It correctly > double-quotes

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Rich Shepard
On Thu, 24 Sep 2009, C. Mundi wrote: > I just bit the bullet and did it. Python has an excellent csv module, > capable of handling just about any dialect you're likely to encounter. I > am so grateful I did not have to write a parser for CSV. In just a few > lines I can read the csv right into

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread cmartin
On Thu, 24 Sep 2009, Rich Shepard wrote: > On Thu, 24 Sep 2009, C. Mundi wrote: > >> I just bit the bullet and did it. Python has an excellent csv module, >> capable of handling just about any dialect you're likely to encounter. I >> am so grateful I did not have to write a parser for CSV. In j

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread C. Mundi
On Thu, Sep 24, 2009 at 6:45 PM, Rich Shepard wrote: > On Thu, 24 Sep 2009, C. Mundi wrote: > > > I just bit the bullet and did it. Python has an excellent csv module, > > capable of handling just about any dialect you're likely to encounter. I > > am so grateful I did not have to write a parser

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread C. Mundi
On Thu, Sep 24, 2009 at 7:16 PM, wrote: > On Thu, 24 Sep 2009, Rich Shepard wrote: > > > On Thu, 24 Sep 2009, C. Mundi wrote: > > > >> I just bit the bullet and did it. Python has an excellent csv module, > >> capable of handling just about any dialect you're likely to encounter. > I > >> am so

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Dan Bishop
C. Mundi wrote: > Hi. I have scanned the list archives and Googled. I may have missed > something, but what I found was not sufficiently general or robust for my > needs. > > Happily, sqlite has a very nice .output mode for CSV. It correctly > double-quotes fields when they contain a space or a

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread P Kishor
On Thu, Sep 24, 2009 at 9:21 PM, C. Mundi wrote: > On Thu, Sep 24, 2009 at 7:16 PM, wrote: > >> On Thu, 24 Sep 2009, Rich Shepard wrote: >> >> > On Thu, 24 Sep 2009, C. Mundi wrote: >> > >> >> I just bit the bullet and did it.  Python has an excellent csv module, >> >> capable of handling just ab

[sqlite] SQLite JDBC - org.sqlite.NativeDB.step taking up too much time

2009-09-24 Thread George Bills
Hi everyone - this might be a general JDBC question rather than an SQLite specific question, but I'm not sure. I've got an app that's writing to an SQLite database using the latest SQLite JDBC driver ("v056, based on SQLite 3.6.14.2") from http://www.zentus.com/sqlitejdbc/. I've done some basi

Re: [sqlite] Sqlite testing

2009-09-24 Thread ydlu
I create the "Windows CE 6.0" OS image, so the Console command windows was included. I try to build "SQLite3.exe" but failed! So how to test SQLite3 on WIndows CE environment on every build? Thanks On Wed, Sep 23, 2009 at 8:03 AM, Shane Harrelson wrote: > On Wed, Sep 23, 2009 at 12:22 AM, Roger

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-24 Thread Dan Kennedy
On Sep 24, 2009, at 7:04 PM, CityDev wrote: > > Thanks for that Sebastian. > > It does however surprise me. I believe Access Jet handles simultaneous > activities. Indeed I've got a feeling it does row-locking rather than > page-locking. It's odd that SQLite has such a limitation. Anyway, > you

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-24 Thread CityDev
This is what is says on the SQLite site: "We are aware of no other embedded SQL database engine that supports as much concurrency as SQLite. SQLite allows multiple processes to have the database file open at once, and for multiple processes to read the database at once. When any process wants to