Ok, for future reference (drh, please, it would be nice to add this to
the web site)

To import:
 3  5  6
 3  4  6

CREATE TABLE foo (v1,v2,v3);
.separator " "
.import "file.dat" foo


Cheers
Alberto

On 7/19/07, Yusuke ITO <[EMAIL PROTECTED]> wrote:
Hi,

COPY command (like PostgreSQL)
http://www.sqlite.org/lang_copy.html

COPY tbl_foo (col1, col2, col3) FROM stdin;
2       3       4
4       3       2
5       4       387
5       8       5473
\.


--
Yusuke ITO
[EMAIL PROTECTED]

On Thu, 19 Jul 2007 13:01:53 +0200
"Sylko Zschiedrich" <[EMAIL PROTECTED]> wrote:
> We are using precompiled insert statements and bind the parameters.
> The inserts were done in a transaction that is committed and reopened every
> 1000 iterations.
>
> Ciao
> Sylko
>
> -----Urspr〓gliche Nachricht-----
> Von: Alberto Sim〓s [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 19. Juli 2007 11:57
> An: sqlite-users@sqlite.org
> Betreff: [sqlite] Importing a big text file (CSV?)
>
> Hi
>
> I have a file (big file with 16 000 000 lines) with records like
>
> 2 3 4
> 4 3 2
> 5 4 387
> 5 8 5473
> ...
>
> and I want to import this to an SQLite table.
> Although I can replace all this to INSERT commands very easily, I
> would like to ask first if there is any faster method.
>
> Cheers
> Alberto
> --
> Alberto Sim〓s
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
>
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




--
Alberto Simões

Reply via email to