That's not SQLite doing it...it's sqliteman treating it as empy strings.
 
If you want it be NULL after import just update it yourself.
 
UPDATE mytable SET key=NULL where key='';
 
 
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Northrop Grumman Information Systems
 

________________________________

From: [email protected] on behalf of rf rf
Sent: Mon 11/22/2010 3:40 AM
To: [email protected]
Subject: EXTERNAL:[sqlite] Confused by import of NULL values from CSV file



Hello hopefully someone can help me out on this item
 
I import a CSV flat file into a table (using sqliteman as GUI).  The flat file 
has NULL values as simply no data between two delimiters (I use 'tab' as 
Delimiter).
 
The resulting table does not treat 'no data' between 2 delimiters as NULL.  
When I run CHECK constraints etc. on it it behaves as if the 'no data' was some 
value.  For example in a query it will show an empty value but not as NULL (I 
can see this as SQLiteman has highlights showing NULL fields).
 
How can I set up Sqlite so it will read 'no data' between two delimiters as 
NULL on file import?  Thanks
 
Richard Freggi


     
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to