How can I declare a package variable in SSIS as int? (nullable int).
Ex:
if I got variable Var1 as int in SSIS which maps to my db column (nullable). when ever my db column is null Var1 is getting set to 0.
How can this be handled.
thanks
How can I declare a package variable in SSIS as int? (nullable int).
Ex:
if I got variable Var1 as int in SSIS which maps to my db column (nullable). when ever my db column is null Var1 is getting set to 0.
How can this be handled.
thanks
I tested this out, and it looks like this would work in your scenario. Using a derived column transformation in your data flow, I created a new column and named it "new column". I then added code to the expression property: [variable_name]== 0 ? NULL(DT_I4) : variable_name
You can then map the new column with either the value other then 0 or null to the data source that you are loading.