Re: [sqlite] Tedious CSV import question

2009-09-25 Thread BareFeet
On 26/09/2009, at 3:33 AM, Wilson, Ronald wrote: > the RFC says that everything between the commas is supposed to be > part of the field, including white space. Normally I trim the white > space unless it's quoted. You can certainly offer the option to trim whitespace or change case or

Re: [sqlite] ROWID bug in SELECT with JOIN?

2009-09-25 Thread BareFeet
On 26/09/2009, at 7:35 AM, sub sk79 wrote: > Select with two tables joined has no _rowid_ column in select columns. > I think this is a bug - just a quick check with the community before > filing a bug report. > > select * from names, friends where first_name = fname and _rowid_ < 2; > SQL error:

Re: [sqlite] Someone knows about an ETL tool in foreign languages?

2009-09-25 Thread John Machin
On 24/09/2009 12:02 AM, hfdabler wrote: > > Hello to all, > > Being in a pretty much international company, I have come here to ask a few > things about ETL tools and their different languages. Why? The principal focus of this mailing list is SQLite and its C APIs, not ETL. > > We have

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread John Machin
On 26/09/2009 5:38 AM, Petite Abeille wrote: > On Sep 25, 2009, at 9:21 PM, C. Mundi wrote: > >> Your post neatly articulates virtually every facet of this issue. >> Thank you. I wish we could get everyone to stop using csv. I hate to >> look at xml but I often wish everyone would use it

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread C. Mundi
Cool. Where do I send my application (for citizenship)? :) Carlos On 9/25/09, Petite Abeille wrote: > > On Sep 25, 2009, at 9:21 PM, C. Mundi wrote: > >> Your post neatly articulates virtually every facet of this issue. >> Thank you. I wish we could get everyone to

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread John Machin
On 26/09/2009 5:03 AM, Wilson, Ronald wrote: > > > Yeah. The clearest thing in the RFC is the ABNF grammar. However, even > that leaves out common cases like white space outside of quoted fields, > which most people would expect to be trimmed. Also, I think most people > would expect

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Dan Bishop
C. Mundi wrote: > On 9/25/09, Jay A. Kreibich wrote: > >> ... >> >> CSV is a great quick and dirty format to move data. But it isn't >> "simple" and it isn't nearly as universal as many assume. It works >> great if you're just moving simple numbers and strings that

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Simon Slavin
On 26 Sep 2009, at 1:40am, BareFeet wrote: > As above, I think it is pretty simple. The complexity arrives when > people expect CSV to provide more than a simple array of strings. One of my free programs has to read CSV files ( http://www.hearsay.demon.co.uk/mac/MacGarminTools/csv2gpx.html

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread BareFeet
On 26/09/2009, at 12:00 AM, Jay A. Kreibich wrote: > On Fri, Sep 25, 2009 at 10:24:15AM +1000, BareFeet scratched on the > wall: > >> In reality, in the thousands of CSV files I've dealt with >> over the years, they all follow the same standard: >> >> 1. Rows are delimited by a new line (return

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Fred Williams
If you have a file that conforms fully to the RFC, I honestly don't see the problem. Your examples do not meet the RFC rules. If the rule does not address leading spaces outside the quoted text, then the input file should not contain spaces there as they will be ignored. Over the years I have

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Fred Williams
Thanks Dr. I already read that along time ago and fully understand it 100%. Seems many others either do not read or do not understand simple straight forward descriptions of basic functionality. Or just maybe they ask anyway hoping someone will say well why not? :-) Fred 120% happy with

Re: [sqlite] ROWID bug in SELECT with JOIN?

2009-09-25 Thread Igor Tandetnik
sub sk79 wrote: > select * from (select * from names, friends where first_name = fname) > where _rowid_ < 2; > > Above query works - which _rowid_ is this accessing? Well, define "works". In my experiments, _rowid_ is NULL for all rows in the subselect: select

Re: [sqlite] ROWID bug in SELECT with JOIN?

2009-09-25 Thread sub sk79
select * from (select * from names, friends where first_name = fname) where _rowid_ < 2; Above query works - which _rowid_ is this accessing? Since the query works I get an impression the rowid is attached with the result-set returned by a select? -sk On Fri, Sep 25, 2009 at 6:07 PM, Igor

[sqlite] changes to how quoted phrases are handled in fts queries involving table columns?

2009-09-25 Thread Seth Spitzer
In previous versions of SQLite (3.5.4.2), the following worked as expected: CREATE VIRTUAL TABLE cities USING fts3(name, state, nickname); INSERT into cities (name,state,nickname) VALUES ("new york", "ny", "big apple"); INSERT into cities (name,state,nickname) VALUES ("apple town", "xx", "big

Re: [sqlite] ROWID bug in SELECT with JOIN?

2009-09-25 Thread Igor Tandetnik
sub sk79 wrote: > Select with two tables joined has no _rowid_ column in select columns. > I think this is a bug - just a quick check with the community before > filing a bug report. > > select * from names, friends where first_name = fname and _rowid_ < 2; > SQL error: no such

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Marcus Grimm
I would like to add also a comment here: Sqlite perfectly works as a backend for multi user applications/servers IF they are implemented accordingly. That is, avoid multible processes/instances that access the same db file, use one main process and threads instead. Take care about busy handling

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Petite Abeille
On Sep 25, 2009, at 9:21 PM, C. Mundi wrote: > Your post neatly articulates virtually every facet of this issue. > Thank you. I wish we could get everyone to stop using csv. I hate to > look at xml but I often wish everyone would use it instead of csv. In fact, in Switzerland, there is a

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread C. Mundi
Jay... Your post neatly articulates virtually every facet of this issue. Thank you. I wish we could get everyone to stop using csv. I hate to look at xml but I often wish everyone would use it instead of csv. I would hate to see any of the sqlite core devs waste time on csv. Carlos On

Re: [sqlite] TH3 license

2009-09-25 Thread D. Richard Hipp
On Sep 25, 2009, at 3:05 PM, Rich Shepard wrote: > On Fri, 25 Sep 2009, Clifford Hung wrote: > >> How do I obtain a TH3 license? > > I've no idea what a TH3 license is, and Google didn't help any. http://www.sqlite.org/th3.html Clifford: Please call the SQLite.org offices at 704.948.4565

Re: [sqlite] TH3 license

2009-09-25 Thread Clifford Hung
I'm referring to the license needed to access the TH3 tests, please see http://www.sqlite.org/th3.html. > Date: Fri, 25 Sep 2009 12:05:40 -0700 > From: rshep...@appl-ecosys.com > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] TH3 license > > On Fri, 25 Sep 2009, Clifford Hung wrote: > >

Re: [sqlite] TH3 license

2009-09-25 Thread Rich Shepard
On Fri, 25 Sep 2009, Clifford Hung wrote: > How do I obtain a TH3 license? Perhaps go to the local DMV office and wait in line for several hours? I've no idea what a TH3 license is, and Google didn't help any. If you want to use SQLite for some purpose read

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Wilson, Ronald
> > I read the RFC last night > > Oh, my... > > Programming in Lua has a nice, concise example regarding CSV parsing > (near the end of the page): > > http://www.lua.org/pil/20.4.html > > Quote: > > To break a CSV into an array is more difficult, because we must avoid > mixing up the commas

[sqlite] TH3 license

2009-09-25 Thread Clifford Hung
Hi, How do I obtain a TH3 license? Thanks, Clifford _ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Petite Abeille
On Sep 25, 2009, at 7:33 PM, Wilson, Ronald wrote: > I read the RFC last night Oh, my... Programming in Lua has a nice, concise example regarding CSV parsing (near the end of the page): http://www.lua.org/pil/20.4.html Quote: To break a CSV into an array is more difficult, because we must

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Wilson, Ronald
> > Still, the RFC does not > > address how to handle rows like this: > > > > 1234,abc"123",abc > > 1235,""123,abc > > Both violate the format as defined. Generate an error message or > interpret them any way that suits you. > > > What are you supposed to do with those? It is not clear. Also,

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread John Lynch
I will try what you have mentioned below. I am 99% sure it isnt the perl script, since it doesn't have the same behavior without attaches. I will let you know what happens. Thank You 2009/9/25 D. Richard Hipp > > On Sep 25, 2009, at 11:02 AM, John Lynch wrote: > > > page size

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread John Lynch
I only query for one row at a time. 2009/9/25 Simon Slavin > > On 25 Sep 2009, at 1:10pm, Kees Nuyt wrote: > > > 4) Don't try to collect the full resultset into a Perl > > array. > > LOL > > Simon. > ___ > sqlite-users

Re: [sqlite] Inconsistent behavior - perhaps a bug?

2009-09-25 Thread Pavel Ivanov
According to http://www.sqlite.org/lang_select.html and http://www.sqlite.org/lang_expr.html one can use in select statement as a result column one of the following: - * - table_name.* (I assume that instead of table_name one can use table alias too) - any expression Expression can consist of the

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread D. Richard Hipp
On Sep 25, 2009, at 1:13 PM, CityDev wrote: > > > Fred Williams-5 wrote: >> >> no further need to ask and answer, "Will SQLite support >> multi users? >> > Maybe it should be covered a bit more specifically on the SQLite site, http://www.sqlite.org/whentouse.html > bearing in mind that new

[sqlite] Inconsistent behavior - perhaps a bug?

2009-09-25 Thread Schrum, Allan
$ bin/sqlite3 SQLite version 3.6.17 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t(a integer); sqlite> select main.t.* from t; SQL error: near "*": syntax error sqlite> select main.t.* from main.t; SQL error: near "*": syntax error sqlite> select

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Simon Slavin
On 25 Sep 2009, at 6:33pm, Wilson, Ronald wrote: > Still, the RFC does not > address how to handle rows like this: > > 1234,abc"123",abc > 1235,""123,abc Both violate the format as defined. Generate an error message or interpret them any way that suits you. > What are you supposed to do

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Wilson, Ronald
> Reading the RFC only proves my point. SQLite v3 is older than that > doc, and it pretty much admits the cat was out of the bag a long time > ago. There are a ton of optional and might/may/could sections that > event the format they define has a lot of holes in it (i.e. headers, > or

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread CityDev
Fred Williams-5 wrote: > > no further need to ask and answer, "Will SQLite support > multi users? > Maybe it should be covered a bit more specifically on the SQLite site, bearing in mind that new people would naturally have the mindset that databases are for shared use normally. SQLite does

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Simon Slavin
On 25 Sep 2009, at 3:00pm, Jay A. Kreibich wrote: > Personally, I'd rather have the SQLite team working on core database > features than trying to build a better CSV parser Yet strangely, the command-line tool is one of the best things about SQLite. If I appear to find a bug in a SQLite

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread Simon Slavin
On 25 Sep 2009, at 1:10pm, Kees Nuyt wrote: > 4) Don't try to collect the full resultset into a Perl > array. LOL Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Fred Williams
Since SLQite was never intended for multi user databases in the initial design i.e. the name "SQLite" I would say the design is the reason. Now can the design be reengineered to allow finer grain locking as an option without derailing the original design intent? That is for those that do all the

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread D. Richard Hipp
On Sep 25, 2009, at 11:02 AM, John Lynch wrote: > page size is max (32768). These sqlt files are around 100Gig with 200 > million rows. > I have query_cache set to 0. > > I am running single queries against these attach tables and then > putting the > data in memcached. The script runs

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread John Lynch
page size is max (32768). These sqlt files are around 100Gig with 200 million rows. I have query_cache set to 0. I am running single queries against these attach tables and then putting the data in memcached. The script runs thousands of queries before it runs out of memory. If I use the same

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

2009-09-25 Thread Pavel Ivanov
> Does anyone know why this method might be so expensive? Because it's main method to execute your queries. I believe I can safely assume that org.sqlite.NativeDB.step maps directly to C call sqlite3_step() and it's the only function where query is executed. It doesn't just iterate through

Re: [sqlite] Tedious CSV import question

2009-09-25 Thread Jay A. Kreibich
On Fri, Sep 25, 2009 at 10:24:15AM +1000, BareFeet scratched on the wall: > In reality, in the thousands of CSV files I've dealt with > over the years, they all follow the same standard: > > 1. Rows are delimited by a new line (return and/or line feed). > 2. Columns are delimited by a comma.

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread P Kishor
On Thu, Sep 24, 2009 at 3:30 PM, John Lynch wrote: > 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

Re: [sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 Thread Kees Nuyt
On Thu, 24 Sep 2009 15:30:40 -0500, John Lynch wrote: >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

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Kees Nuyt
On Thu, 24 Sep 2009 22:58:28 -0700 (PDT), CityDev wrote: > >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

[sqlite] Attach databases using tons of memory (DBI Perl)

2009-09-25 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

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Simon Slavin
On 25 Sep 2009, at 6:58am, CityDev wrote: > What that seems to be saying is you can have concurrency but you > will suffer > the effects of whole-database locking for update transactions. It > seems a > glaring shortcoming, so either SQLite is not normally used by multiple > processes or

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 CityDev wrote: > What that seems to be saying is you can have concurrency but you will suffer > the effects of whole-database locking for update transactions. It seems a > glaring shortcoming, so either SQLite is not normally used by multiple >