开发者

Declaring package variable in SSIS of type int? (nullable int)

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜