June 4, 2015 at 8:40 am
Good morning - I have a SSIS dataflow that I am simply pulling data from a query (ODBC Source), and outputting this to a .csv file on a daily basis. I have created the pkg.dtsx (SQL 08 Visual Studio 08) in a project, and it works fine EXCEPT it is passing blanks instead of 'null's in the csv file. The programmer using this file would like null in the csv file instead of blanks. I know how to do this if the source is a flat file, but cannot find an option if the source is a query.
Any help is appreciated..
June 4, 2015 at 8:55 am
You could try changing NULLS to 'NULL's in your query, something like this (assuming it's not a numeric column):
COALESCE(MyColumn,'NULL')
Alternatively, you could put a Derived Column transformation in your data flow to do the same thing.
John
June 4, 2015 at 8:56 am
Brian Seib (6/4/2015)
Good morning - I have a SSIS dataflow that I am simply pulling data from a query (ODBC Source), and outputting this to a .csv file on a daily basis. I have created the pkg.dtsx (SQL 08 Visual Studio 08) in a project, and it works fine EXCEPT it is passing blanks instead of 'null's in the csv file. The programmer using this file would like null in the csv file instead of blanks. I know how to do this if the source is a flat file, but cannot find an option if the source is a query.Any help is appreciated..
What does the programmer want for nulls? The word "NULL"? What represents a blank in the .csv file?
In my world, in a CSV file, blanks and nulls are the same. They're both the absence of any characters between 2 commas.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply