I had to convert this to ssis:
WHEN CAST(T1.[ORIG_DT] as datetime) >= T.[SETTLE_dt] THEN '1'
WHEN CAST(T1.[ISSUE_DT] as datetime)>= T.[settle_dt] THEN '3'
WHEN CAST(T1.[ISSUE_DT] as datetime) >= T.[Output_dt] AND T1.[ISS_STK] = '1' THEN '4'
END AS [offering_type_cd]
I did the following:
1) conditional split
2) 4 derived columns
3) union all
The part that was confusing was that in the "union all" all of the other columns in the dataset showed up. I thought only the derived column (OfferingTypeCode) would appear in the union all.
Also, I wasn't sure how to get NULL as one of the conditions. Currently, in the conditional split the last order I have is condition 1==0 and created Output OfferingTypeCode5. The expression in the derived column OfferingTypeCode5 is NULL(DT_I4). Is this correct?