Re[2]: [sqlite] Probably not simple question

2005-12-07 Thread Teg
Hello Nathan, Depends on how you access them. Most RISC CPU's can't do unaligned access to multi-byte values like int's and long, they'll segfault. Intel CPU's don't have this problem. If you memcpy the values into place, this is a non-issue. You see it alot with embedded CPU's. Without knowing

Re: [sqlite] Probably not simple question

2005-12-07 Thread Nathan Kurz
On Wed, Dec 07, 2005 at 08:34:46PM -0800, Dan Kennedy wrote: > > To make it work in more than a superficial manner, you probably will > > need a good understanding of how structures are internally represented > > in C++ or C. You pass sqlite a pointer to the struct and tell it how > > long it is

RE: [sqlite] foreign keys? (sqlite3)

2005-12-07 Thread tgreenwood
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've created a class that generates the necessary sql statements to describe the primary-foreign key relationship between two tables. This code is fairly rudimentary so far... Q: Is this interesting to anyone on this list? Q: If so, where should I

Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Eric Bohlman
Arjen Markus wrote: Hm, there is a CSV reading module in Tcllib, so one could contemplate using Tcl instead of Perl for this. That ought to take care of the quotes and other nastiness... Perl's Text::CSV module available from CPAN also handles these issues.

Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread John Stanton
Jay Sprenkle wrote: On 12/6/05, ronggui wong <[EMAIL PROTECTED]> wrote: I have a very large CSV file with 1 rows and 100 columns.and the file looks like the following: "a","b","c","d", "1","2","1","3" , "3","2","2","1", .. If I use .import,It seems I have to set the variable names

Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Jay Sprenkle
On 12/6/05, ronggui wong <[EMAIL PROTECTED]> wrote: > I have a very large CSV file with 1 rows and 100 columns.and the > file looks like the following: > "a","b","c","d", > "1","2","1","3" , > "3","2","2","1", > .. > > If I use .import,It seems I have to set the variable names manually . >

Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Arjen Markus
Aaron Peterson wrote: > > On 12/7/05, Teg <[EMAIL PROTECTED]> wrote: > > Hello All, > > > > Wouldn't it make sense to write a program that reads it in, one line > > at a time, splits and inserts the data into the proper tables? Even > > creating the table on the fly? That's what I'd do, a little

Re: Re[2]: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Aaron Peterson
On 12/7/05, Teg <[EMAIL PROTECTED]> wrote: > Hello All, > > Wouldn't it make sense to write a program that reads it in, one line > at a time, splits and inserts the data into the proper tables? Even > creating the table on the fly? That's what I'd do, a little command > line utility. One could

Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Edwin Knoppert
PBDBMS on www.hellobasic.com All through ADO.. - Original Message - From: "Cariotoglou Mike" <[EMAIL PROTECTED]> To: Sent: Wednesday, December 07, 2005 9:23 AM Subject: RE: [sqlite] how can I import CSV file into SQLite quickly sqlite3Explorer does that

RE: [sqlite] how can I import CSV file into SQLite quickly

2005-12-07 Thread Cariotoglou Mike
sqlite3Explorer does that From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Wed 07-Dec-05 8:00 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] how can I import CSV file into SQLite quickly Someone somwhere must have a simple Perl script which does what