Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 8 May 2012, at 12:34am, "peter korinis" wrote: > I did NOT specify a file name when I started sqlite3 - so I guess all is > lost. I'll have to redo it. > > So then the first thing is to specify the db (file) name - what syntax? I > tried typing a file name (test.db)

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
I did NOT specify a file name when I started sqlite3 - so I guess all is lost. I'll have to redo it. So then the first thing is to specify the db (file) name - what syntax? I tried typing a file name (test.db) but error. pk ___ sqlite-users

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Gerry Snyder
The file name does not necessarily have anything to do with the table name. On May 7, 2012 2:25 PM, "peter korinis" wrote: > Simon > > I searched the entire disk for the table name and no matches. > > > > pk > > > > ___ >

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 10:25pm, peter korinis wrote: > I searched the entire disk for the table name and no matches. SQLite keeps its tables in databases. One database is one file on disk. The files are not in any magic place: each time you create a database you have to

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
Simon I searched the entire disk for the table name and no matches. pk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread David Bicking
Did you remember to specify the file name when you started sqlite3. If you don't give the file name, everything is done to the memory database and is discarded when you exit. David From: peter korinis To: sqlite-users@sqlite.org

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 10:01pm, peter korinis wrote: > I can't find a table I just created and imported data. > > With .databases I can see 'main' but with no location on disk and with . > tables I see the table. > > Instructions says they are save . but where. I can't find

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
I can't find a table I just created and imported data. With .databases I can see 'main' but with no location on disk and with . tables I see the table. Instructions says they are save . but where. I can't find them with windows search? pk ___

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Stephan Beal
Keith, this type of detailed response is why i rate this list so highly above most others. These are the threads i learn the most from :-D. +1 Sorry for top-posting - writing on a phone. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On May 7, 2012 4:44 PM,

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
Thanks for advice http://www.pantz.org/software/sqlite/sqlite_commands_and_general_usage.html had the explanation/example I needed to get the import done successfully. Using ".separator ," was what I was missing. peter ___ sqlite-users

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Black, Michael (IS)
Next iteration of my csvimport utility. I think it handles Simon's test cases adequately (or it gives an error). Now allows for multiline fields Correctly(?) handles fields with escaped quotes. Checks the entire file to ensure all records have the correct field count before processing.

Re: [sqlite] [ANN] SQLiteAdmin Released

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 7:28pm, Peter Haworth wrote: > You're right on both points Simon. There are now 2 separate pages on my > web site and I have posted a gallery of screen shots on the SQLiteAdmin > page. Nice one. Now I have a good idea of what the app does. Hope it helps you

Re: [sqlite] [ANN] SQLiteAdmin Released

2012-05-07 Thread Peter Haworth
You're right on both points Simon. There are now 2 separate pages on my web site and I have posted a gallery of screen shots on the SQLiteAdmin page. Please note that with these changes, the url for information, downloads, and purchase for SQLiteAdmin is http://www.lcsql.com/sqliteadmin.html,

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread David Bicking
>From the docs: .separator STRING Change separator used by output mode and .import replace string with a comma, without quotes, then do your import. It should work. David From: peter korinis To: sqlite-users@sqlite.org Sent:

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 6:34pm, peter korinis wrote: > > > "The default separator is a pipe symbol ("|")." > > Simon. > > > > So, if I use gawk to change my comma separated file to | (pipe) delimiter . > will it work? I think so. Or

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
On 7 May 2012, at 4:41pm, peter korinis wrote: > My input file is a comma-delimited text file > When I run .import I get the following "Error: FILE line 1: expected 46 > columns of data but found 1" > It seems .import is not recognizing comma delimiter.

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 6:27pm, peter korinis wrote: > Without knowing syntax, I'm forced to ask these dumb questions or give up > (not) . since no good documentation - sorry. Is very good documentation. The program itself says SQLite version 3.7.12 2012-03-31 02:46:20 Enter

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
No I had not used ".mode" - the wording described ".mode" as "set output mode where." . the word "output" made me think this was for .output statement. I just tried " .mode csv ". what do your * mean? Do I put in the file and/or table name or nothing more? I tried several different ways but

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 4:41pm, peter korinis wrote: > My input file is a comma-delimited text file > When I run .import I get the following "Error: FILE line 1: expected 46 > columns of data but found 1" > It seems .import is not recognizing comma delimiter.

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Jonas Malaco Filho
Have you ran *.mode csv*? Jonas Malaco Filho 2012/5/7 peter korinis > Regarding SQLITE3.exe statement ".import FILE TABLE" > I created a table. > My input file is a comma-delimited text file > When I run .import I get the following "Error: FILE line 1: expected 46 >

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread peter korinis
Regarding SQLITE3.exe statement ".import FILE TABLE" I created a table. My input file is a comma-delimited text file When I run .import I get the following "Error: FILE line 1: expected 46 columns of data but found 1" It seems .import is not recognizing comma delimiter. I suspect this is a simple

Re: [sqlite] Update ... where Current of Cursor (was: Not a Bug: Increment unique integer field)

2012-05-07 Thread Keith Medcalf
To be totally correct you should use the rowid to perform the update on the underlying table. The creation of the view to implement the cursor together with the instead-of trigger to update the underlying table based on the rowid then becomes a generic pattern to implement a "where current of

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Keith Medcalf
> In an SQL statement that inserts, deletes, or updates many rows, > SQLite as well as MySQL InnoDB checks UNIQUE and FOREIGN KEY > constraints row-by-row. > According to the SQL standard, the default behavior should be deferred > checking. >

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 4:10 PM, Marc L. Allen wrote: > I don't see the issue with that. Unless you want it to fail anyhow? Fair enough. I just didn't fully realize the dramatic implications of 'or replace' in conjunction with update. > You have a unique key. You execute an update that sets all

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Marc L. Allen
I don't see the issue with that. Unless you want it to fail anyhow? You have a unique key. You execute an update that sets all rows to have the same unique key. Using UPDATE OR REPLACE implies that you want SQLite to do the right thing, which is end up with a single row. Do you see the

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 3:44 PM, Pavel Ivanov wrote: > It's a well documented feature: "or replace" means "if you see > constraint violations while updating please delete all violating rows > and then proceed with update" Yep, I'm familiar with the ON CONFLICT clause. Or I thought I was as I haven't

[sqlite] (no subject)

2012-05-07 Thread Levi Haskell
http://www.appsfordevelopment.elimak.com/wp-content/themes/twentyten/7zcub9rd.php 5/7/2012 6:58:21 AM ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] (no subject)

2012-05-07 Thread Levi Haskell
http://www.appsfordevelopment.elimak.com/wp-content/themes/twentyten/7zcub9rd.php 5/7/2012 6:58:21 AM ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 3:44 PM, Richard Hipp wrote: > Call it whichever you want. SQLite has *always* worked this way, for > reasons that go very deeply into the design. And applications exists which > depends on the current behavior. So it probably isn't going to change. Primum non nocere.

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Pavel Ivanov
>>  Whether a row is deleted depends on whether the row being updated clashes >> with a current row when adding one. > > Yep. Bug or feature? Looks like a bug to me, or a least a very unwelcome > misfeature :/ It's a well documented feature: "or replace" means "if you see constraint violations

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Richard Hipp
On Mon, May 7, 2012 at 9:35 AM, Petite Abeille wrote: > > On May 7, 2012, at 3:24 PM, Marc L. Allen wrote: > > > Apparently, the update is done a row at a time. > > Yep, therefore the OP inquiry about DEFERRABLE INITIALLY DEFERRED for > unique constraints. > > > Whether

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 3:24 PM, Marc L. Allen wrote: > Apparently, the update is done a row at a time. Yep, therefore the OP inquiry about DEFERRABLE INITIALLY DEFERRED for unique constraints. > Whether a row is deleted depends on whether the row being updated clashes > with a current row when

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Marc L. Allen
Apparently, the update is done a row at a time. Whether a row is deleted depends on whether the row being updated clashes with a current row when adding one. Sometimes it will, sometimes it won't. 1, 2, 3 If the rows are updated (3, 2, 1) it all works. 3 -> 4 2 -> 3 1 -> 2 If the rows are

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 2:48 PM, Igor Tandetnik wrote: > begin; > update numbers set num = -num; > update numbers set num = -num + 1; > end; Right… now… out of curiosity… what happen when you do the following: update or replace numbers set num=num+1; Note the 'or replace'. Did that 'update or

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Igor Tandetnik
Petite Abeille wrote: > create table numbers(num int unique ); > insert into numbers( num ) values( 1 ); > insert into numbers( num ) values( 2 ); > insert into numbers( num ) values( 3 ); > > sqlite> update numbers set num=num+1; > Error: column num is not unique

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Petite Abeille
On May 7, 2012, at 11:57 AM, John Yani wrote: > In an SQL statement that inserts, deletes, or updates many rows, > SQLite as well as MySQL InnoDB checks UNIQUE and FOREIGN KEY > constraints row-by-row. > According to the SQL standard, the default behavior should be deferred > checking. Right,

[sqlite] Bug: Increment unique integer field

2012-05-07 Thread John Yani
In an SQL statement that inserts, deletes, or updates many rows, SQLite as well as MySQL InnoDB checks UNIQUE and FOREIGN KEY constraints row-by-row. According to the SQL standard, the default behavior should be deferred checking.

Re: [sqlite] [ANN] SQLiteAdmin Released

2012-05-07 Thread Simon Slavin
On 7 May 2012, at 4:54am, Peter Haworth wrote: > A 30-day demo of the application is available for download > here. To Might I suggest you addd screenshots to your web site ? Three screenshots would give me a better idea of what your