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 be the best method?
> 

You might be able to do it more directly using the .import command. It 
can read a fixed number of columns separated by fixed delimiters. It 
works with CSV files for example.

All data are inserted as strings, but the strings may be converted to 
integer or real values if the columns have suitable affinity (see 
http://www.sqlite.org/datatype3.html for more details).

HTH
Dennis Cote


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to