[英]ssis assign a value to a guid when null
I have the following expression in ssis 我在ssis中有以下表达式
(ISNULL [rowguid]? (DT_WSTR, 255)"00000000-0000-0000-0000-000000000000":[rowguid])
What I want is to assign that guid if there is null present. 我想要的是如果存在null则分配该guid。 I just can't seem to get it working
我似乎无法让它工作
I finally figured this one out. 我终于想出了这一个。 You need to include "{" and "}" on the front and end of your default GUID.
您需要在默认GUID的前端和末尾添加“{”和“}”。 So for example, (DT_GUID) "{00000000-0000-0000-0000-000000000000}".
例如,(DT_GUID)“{00000000-0000-0000-0000-000000000000}”。
A little frustrating, I tried "[]" but never even thought to try "{}". 有点沮丧,我试过“[]”,但从未想过尝试“{}”。
FInally通过跟踪和错误得到了答案
(DT_STR,50,1252) (ISNULL( [rowguid]) ? "00000000-0000-0000-0000-000000000000" : (DT_STR,50,1252) [rowguid]) != (DT_STR,50,1252) (ISNULL( [rowguid]) ? "00000000-0000-0000-0000-000000000000" : (DT_STR,50,1252) [rowguid])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.