Reputation: 609
I have the following expression in 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. I just can't seem to get it working
Upvotes: 3
Views: 2682
Reputation: 609
FInally got the answer via trail and error
(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])
Upvotes: 4
Reputation: 617
I finally figured this one out. You need to include "{" and "}" on the front and end of your default GUID. So for example, (DT_GUID) "{00000000-0000-0000-0000-000000000000}".
A little frustrating, I tried "[]" but never even thought to try "{}".
Upvotes: 3