Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Question on Retain null values from source as null values in data flow

$
0
0

We are writing a SSIS package to export a table to flat file and  following is the table structure:

Create table dd(dd int not null, dd1 nvarchar(100) not null, dd2 nvarchar(100) not null, dd3 int)

Column dd1 and dd2 can have value as ‘ ‘ or ‘  ‘ to avoid not null issue since space is not null for SQL Server so source data is fine and column dd3 can be null.

Now during import if we use option “Retain null values from source as null values in data flow” to false then dd1 and dd2 are imported fine but dd3 got value 0 (default for int)

And we if set the option to true then SSIS import consider ‘ ‘ as null and dd2/dd3 column fails for not null constraint.

Is there any option to specify this setting at column level or what is the best way to solve this issue without using derived table?


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>