Sam
Sam

Reputation: 7678

Export null to .csv

I'm using the export data wizard in sql server 2005.

I've got a table with null values in many of the fields. I'd like to keep these fields as I export to .csv but they are being replaced with empty strings.

I've tried changing the 'nullable' checkbox for the fields in the wizard, but that doesn't seem to do anything. Also tried using " as a delimiter, since without delimiters, NULL would be interpreted as a string.

Upvotes: 2

Views: 8892

Answers (1)

Ken Browning
Ken Browning

Reputation: 29091

There's no such thing as a null in .csv files. Like you said, a value of null, "null" or "" would all be interpreted as a string value. Consider changing your source so it adds a "ColumnXIsNull" value to the exported records.

Upvotes: 6

Related Questions