Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Adding column in data load editor??

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

6 Replies
craigsutton
Creator
Creator

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

Anonymous
Not applicable
Author

Thanks...it works good.

Anil_Babu_Samineni

If you got answer please close this thread by flag correct answer

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

How can we make this expression dynamic?

Anil_Babu_Samineni

when you talk about Dynamic? you need to provide sample data and expected result

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I meant dynamic for the dates in the above expression