Search code examples
sqlssis-2012

ssis assign a value to a guid when null


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


Solution

  • 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])