Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a column SCD_SHIP_DATE in data load editor. I want to add a column SCD_SHIP_DATE_DESC manually in such a way that ;
SCD_SHIP_DATE SCD_SHIP_DATE_DESC
12/14/2016 Today
Prior to 12/14/2016 LOD
12/15/2016 Tomorrow
12/16/2016 to 12/30/2016 12/16/2016-12/30/2016
1/1/2017 to 1/30/2017 Jan Shipment
How can I do it?
Thanks
Juna
Maybe something like this in your script:
if(SCD_SHIP_DATE < '12/14/2016', 'LOD',
IF(SCD_SHIP_DATE = '12/14/2016', 'Today',
IF(SCD_SHIP_DATE = '12/15/2016', 'Tomorrow',
IF(SCD_SHIP_DATE >= '12/16/2016' and SCD_SHIP_DATE <= '12/30/2016', SCD_SHIP_DATE,
IF(SCD_SHIP_DATE >= '1/1/2017' and SCD_SHIP_DATE <= 1/30/2017, 'Jan Shipment')
)
)
)
) as SCD_SHIP_DATE_DESC
Thanks...it works good.
If you got answer please close this thread by flag correct answer
How can we make this expression dynamic?
when you talk about Dynamic? you need to provide sample data and expected result
I meant dynamic for the dates in the above expression