November 19th, 2003, 09:25 AM
Importing null values
I'm importing data from a flat text file to an MS SQL database using VB6 ADO.
I have some fields that are empty. When I read them into a text string, they become empty strings, but I want them to show up in the db as <NULL> values. Is there a way to import the value as a null?
November 19th, 2003, 02:00 PM
not sure how you could fix it on the import but you could always run a script to change blanks to nulls
set column = null
where datalength(column) = 0