On 10/24/05, Dennis Cote <[EMAIL PROTECTED]> wrote:
> The .import command in sqlite always imports data as text  (even numeric
> data into numeric columns). There is no way to import a NULL value. The
> closest you can get is an empty string or some other sentinel value,
> like the string NULL (but that would require a couple of search and
> replace operations in your source data file). Note, this will give you a
> string containing the word NULL in these columns rather than an SQL NULL
> value.

OK, I can deal with the Nulls that in SQL...now, what do you mean that
"even numeric data" is imported as text?

I loaded about 85k records into a database, all numeric, and didn't
notice any problems using max() or stdev(). Should I be concerned
about something?

It seems like the dot command extensions really ought to have a help
file somewhere!

David



>
> This can of course also be done is SQL as Kurt suggested.
>
> Or you could write your own import program that reads in the file and
> does the inserts with the correct data bound to the columns as the
> correct type (see sqlite3_bind_double() and sqlite3_bind_null()).
>
> HTH
> Dennis Cote
>


--
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays

Reply via email to