Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Exporting Fields with NULL Values

Author  Topic 

harrisw48
Starting Member

34 Posts

Posted - 2006-11-30 : 09:09:39
When I try and export a table tp a delimited file with "," delimiter using DTS any NULL value is surrounded by a "".

This then causes an issue as some systems then import this as an empty string and not a NULL value.

How can I get around this?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-30 : 09:13:14
What would you like it to be exported as?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harrisw48
Starting Member

34 Posts

Posted - 2006-11-30 : 09:33:53
I need it not to export as "" as the "" is treated as an empty string

I need it to mimic the way that Microsoft Access treats them ie a string of them will appear as "","","","" and I need it as ,,,,,, if you see what I mean.

Thanks
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-30 : 09:35:49
It would be very easy to put

ISNULL(yourcolumn, '') in your query to fix that...


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harrisw48
Starting Member

34 Posts

Posted - 2006-11-30 : 10:29:12
Tried that already.
A null value is still exported with a "" as the field is a varchar it assumes it to be a string and surrounds it with "".

Its a total pain. Cant believe that there isnt an option not to put quotes around NULL values
Go to Top of Page
   

- Advertisement -