Using Conditional Operator In SSIS:
«boolean_expression» ? «when_true» : «when_false»
To hardcode Null : NULL(DT_WSTR, 50)
Following is the expression to get the sub string and compare to "N" and return NULL if true
else the sub string string itself.
(DT_I4)((SUBSTRING(LTRIM(Answer),1,1) == "N") ? NULL(DT_WSTR, 50) : SUBSTRING(LTRIM(Answer),1,1))
No comments:
Post a Comment