On Sun, Dec 06, 2009 at 11:26:42PM -0500, Walter Dnes wrote

> I still don't understand why 2009, *WITHOUT QUOTES* would be forced
> to text, i.e. ' 2009', when imported into a field that is declared
> as integer in the create statement.

  There are actually 2 solutions...

1) Use tab-delimited if possible (not really CSV)

2) Get rid of leading/trailing spaces if you're using comma-separated
input.  E.g. this row results in text fields being imported...
   2231,615HMAK, 2005,  3, 28,  8.0, , -1.0, ,  3.5

...while this one results in mostly numeric fields being imported...
2231,615HMAK,2005,3,28,8.0, ,-1.0, ,3.5

  As an added bonus, the script that got rid of unnecessary spaces also
knocked down the 11,143,911,240 byte CSV file to "only" 5,382,671,854
bytes.  This allowed me to import the file in 3 sub-2-gigabyte pieces
versus 6 pieces that the original required.

-- 
Walter Dnes <waltd...@waltdnes.org>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to