Re: [sqlite] Client/Srever SQLite

2008-06-17 Thread Alex Katebi
Hi John, I was writing a message into the socket partially. I had done this to avoid coping. This caused many transmissions for a single message. At the other end I was doing MSG_PEEK optional flag which was wasteful. I had done this to dump the message for debugging. By building my

Re: [sqlite] Problem using Attach to insert data from another table

2008-06-17 Thread Dan
On Jun 18, 2008, at 9:07 AM, danjenkins wrote: > > Hi. I battling my way through the Attach command and I can't get > my simple > test to work. > > Given a database named "ultra2008.sql" that contains a table named > "ultra" > and a database named "archive2007.sql" that also contains a

Re: [sqlite] Importing table

2008-06-17 Thread Jim Dodgen
don't forget to wrap inserts in begin; commit; pairs On 6/17/08, Dennis Cote <[EMAIL PROTECTED]> wrote: > Alberto Simões wrote: > > > > I have a text file with 18 399 392 lines. Each line contains five > > fields. Four are a compound key, the other is just data. > > What is the best way to

[sqlite] Problem using Attach to insert data from another table

2008-06-17 Thread danjenkins
Hi. I battling my way through the Attach command and I can't get my simple test to work. Given a database named "ultra2008.sql" that contains a table named "ultra" and a database named "archive2007.sql" that also contains a table named "ultra" where the databases and tables have identical

Re: [sqlite] SQL question

2008-06-17 Thread Gregor Brandt
I did change it to: UPDATE `table` SET `id` = `id` + 32768 WHERE `id` >= x and then I decrement everything over 32768 by 32767 to get it back in line. This was required because a single update on a primary key did return an error about a key conflict when only incrementing by 1! Thanks,

Re: [sqlite] SQLite3 to SQLite2?

2008-06-17 Thread Gilles Ganault
On Mon, 16 Jun 2008 18:32:12 -0600, "David Baird" <[EMAIL PROTECTED]> wrote: >echo .dump | sqlite3 input.db | sqlite output.db Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] splitting field data

2008-06-17 Thread Rich Shepard
On Tue, 17 Jun 2008, [EMAIL PROTECTED] wrote: > As shown, ITEMS is comprised of individual data items separated by > semicolons. For some purposes, this concatenated form suits the purpose, > but for other purposes I need to split these items into individual data > points. That is, I want to

[sqlite] splitting field data

2008-06-17 Thread cmartin
I have a table that contains 2 fields: ID, ITEMS, as: CREATE TABLE foo (ID INTEGER PRIMARY KEY, ITEMS); INSERT INTO foo VALUES(1,item1;item2;item3); INSERT INTO foo VALUES(2,item1;item4); INSERT INTO foo VALUES(3,item5;item3;item7); As shown, ITEMS is comprised of individual data items separated

[sqlite] Firefox Download Day

2008-06-17 Thread D. Richard Hipp
Firefox version 3.0 is now available for download at http://www.mozilla.com/ Mozilla is trying to set a world record for the most software downloads in 24 hours. So if you are able to download a copy of firefox 3.0 today, please do so. If you didn't know already, Firefox 3.0 makes heavy

Re: [sqlite] Importing table

2008-06-17 Thread Dennis Cote
Alberto Simões wrote: > > I have a text file with 18 399 392 lines. Each line contains five > fields. Four are a compound key, the other is just data. > What is the best way to import this to sqlite? > > I am thinking on creating another text file with 18 399 392 INSERT commands. > Would that

Re: [sqlite] Importing table

2008-06-17 Thread Alberto Simões
On Tue, Jun 17, 2008 at 6:33 PM, P Kishor <[EMAIL PROTECTED]> wrote: > On 6/17/08, Alberto Simões <[EMAIL PROTECTED]> wrote: >> Hi, Folks >> I am thinking on creating another text file with 18 399 392 INSERT >> commands. >> Would that be the best method? > > Look at the .read command in the

Re: [sqlite] Segmentation Fault when using mod_python / mod_wsgi

2008-06-17 Thread Eric Holmberg
> Eric Holmberg wrote: > > PyDict_GetItem (op=0x0, key=0xb7ce82cc) at Objects/dictobject.c:571 > > 571 if (!PyDict_Check(op)) > > You would need to supply more of the backtrace since the > calling routine is supplying a null pointer instead of a > dictionary. Nothing points to

Re: [sqlite] Importing table

2008-06-17 Thread P Kishor
On 6/17/08, Alberto Simões <[EMAIL PROTECTED]> wrote: > Hi, Folks > > I have a text file with 18 399 392 lines. Each line contains five > fields. Four are a compound key, the other is just data. > What is the best way to import this to sqlite? > > I am thinking on creating another text file

[sqlite] Importing table

2008-06-17 Thread Alberto Simões
Hi, Folks I have a text file with 18 399 392 lines. Each line contains five fields. Four are a compound key, the other is just data. What is the best way to import this to sqlite? I am thinking on creating another text file with 18 399 392 INSERT commands. Would that be the best method? (by

Re: [sqlite] Long delay for delete/select row in database

2008-06-17 Thread Dennis Cote
Raphaël KINDT wrote: > > I'm working on a video monitoring program that uses frame grabber (12 > cameras). > This program records videos and detects some (input/output) events such as : > motion detection, blue screens (cut camera cable), I/Os 1 to 24, and much > more... > > I save all events in

Re: [sqlite] SQlite and C works with "like" but not with "="

2008-06-17 Thread Wilson, Ron P
Also, don't forget trailing white space, e.g. "Hexion " != "Hexion". RW Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik Sent: Saturday, June 14, 2008 10:55 AM To:

Re: [sqlite] Long delay for delete/select row in database

2008-06-17 Thread barabbas
Hi Raphaël, Since you are dealing with intervals of numbers, perhaps recent discussion of rtree indexing will help. Besides, separating instant into highly used level of unit may be also useful. For example, instant_date and instant_time. Another rough method is applying PRAGMA synchronous =

Re: [sqlite] Client/Srever SQLite

2008-06-17 Thread John Stanton
What did you change? What was causing the lag? Alex Katebi wrote: > slowness is fixed. Can't tell the difference between client/server speed > from library. > > On Sat, Jun 14, 2008 at 8:32 PM, Alex Katebi <[EMAIL PROTECTED]> wrote: > > >>Hi All, >> >> Looks like there is some interest. I

Re: [sqlite] How to import CSV data if strings NULL?

2008-06-17 Thread Dennis Cote
Gilles Ganault wrote: > > It's probably trivial but I'm having a difficult time using Python > to import a tab-delimited file into SQLite because some columns might > be empty, so the INSERT string should contain NULL instead of "NULL". > One thing you can do is let the import utility

Re: [sqlite] SQLite 3.5.9 build problem - token expected in btree.c

2008-06-17 Thread Dennis Cote
Klemens Friedl wrote: > While upgrading from an older SQLite 3.4.2, I stuble upon the > following build problem. > > me\sqlite3\btree.c:61: error: expected ';', ',' or ')' before '-' token > mingw32-make: *** [obj-i386\me\sqlite3\btree_sqlite3.o] Error 1 > > Has someone experienced similar build

Re: [sqlite] help with Dates please

2008-06-17 Thread Dennis Cote
John wrote: > > You might also want to look at using triggers to auto insert the > datetimestamp as your entries are inserted/updated. > For completeness, you may also want to look at the DEFAULT time and date codes; CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP at

Re: [sqlite] Structural detection of AUTOINCREMENT

2008-06-17 Thread Dennis Cote
Csaba wrote: > >> BTW, the autoincrement keyword must appear after the integer primary key >> phrase, not in the middle as you have show it. > > This was an interesting note. I am using the SQLite that came with my > PHP v. 5.2.6 (built Feb 13, 2008), which is SQLite 2.8.17. > Turns out that

[sqlite] Long delay for delete/select row in database

2008-06-17 Thread Raphaël KINDT
Hi everybody, I'm working on a video monitoring program that uses frame grabber (12 cameras). This program records videos and detects some (input/output) events such as : motion detection, blue screens (cut camera cable), I/Os 1 to 24, and much more... I save all events in a database (sqlite3)

Re: [sqlite] DB does not get updated after many writes

2008-06-17 Thread sethuarun
My Environment details: OS: Montavista kernel version 2.4 compiler: gcc (GCC) 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24) Regards, Sethu Mihai Limbasan wrote: > > I doubt that anyone will be able to help you unless you provide more > (or, for that matter, *any*) details about your

Re: [sqlite] Implementing fast database rotation

2008-06-17 Thread Al
Dennis Cote <[EMAIL PROTECTED]> writes: > Al wrote: >> >> I'm using sqlite to implement a fast logging system in an embbeded system. >> For >> mainly space but also performance reason, I need to rotate the databases. >> >> The database is queried regularly and I need to keep at least $min rows

Re: [sqlite] Implementing fast database rotation

2008-06-17 Thread Al
"Rich Rattanni" <[EMAIL PROTECTED]> writes: Hello Rich, Thanks for your proposal, but my purpose is to rotate the databases and remove the oldest files to avoid filling my file system, so I can't use the same table as I want to changes files. The solution which is a good compromise for me for

Re: [sqlite] Segmentation Fault when using mod_python / mod_wsgi

2008-06-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric Holmberg wrote: > PyDict_GetItem (op=0x0, key=0xb7ce82cc) at Objects/dictobject.c:571 > 571 if (!PyDict_Check(op)) You would need to supply more of the backtrace since the calling routine is supplying a null pointer instead of a