Populating Non-null Values in sequential manner in Target
Posted: Mon May 26, 2008 5:31 am
Hi,
My requirement is as below in datastage. It would be helpful if any one could gimme the solution.
In target I have 6 columns(Line1,Line2,Line3,Line4,Line5,Line6), which need to take the non-null values of the source columns in a sequence.
Case 1:Source Values are like below:
AccName1 ---- ABC
AccName2 ---- DEF
AccName3 ---- Null
AccName4 ---- Null
AccName5 ---- Null
AccName6 ---- Null
AccAddress1---Null
AccAddress2---Null
AccAddress3---Null
AccAddress4---Null
AccAddress5---XYZ
AccAddress1---GHI
Target Fields should be populated as below
Line1---ABC
Line2---DEF
Line3---XYZ
Line4---GHI
Line5---Null
Line6---Null
Case 2:Source Values are like below:
AccName1 ---- Null
AccName2 ---- DEF
AccName3 ---- Null
AccName4 ---- Null
AccName5 ---- Null
AccName6 ---- STU
AccAddress1---Null
AccAddress2---Null
AccAddress3---Null
AccAddress4---Null
AccAddress5---XYZ
AccAddress1---Null
Target Fields should be populated as below
Line1---DEF
Line2---STU
Line3---XYZ
Line4---Null
Line5---Null
Line6---Null
The similar way The target values should be assigned a non-null value from source as per the availability in a sequential manner.
My requirement is as below in datastage. It would be helpful if any one could gimme the solution.
In target I have 6 columns(Line1,Line2,Line3,Line4,Line5,Line6), which need to take the non-null values of the source columns in a sequence.
Case 1:Source Values are like below:
AccName1 ---- ABC
AccName2 ---- DEF
AccName3 ---- Null
AccName4 ---- Null
AccName5 ---- Null
AccName6 ---- Null
AccAddress1---Null
AccAddress2---Null
AccAddress3---Null
AccAddress4---Null
AccAddress5---XYZ
AccAddress1---GHI
Target Fields should be populated as below
Line1---ABC
Line2---DEF
Line3---XYZ
Line4---GHI
Line5---Null
Line6---Null
Case 2:Source Values are like below:
AccName1 ---- Null
AccName2 ---- DEF
AccName3 ---- Null
AccName4 ---- Null
AccName5 ---- Null
AccName6 ---- STU
AccAddress1---Null
AccAddress2---Null
AccAddress3---Null
AccAddress4---Null
AccAddress5---XYZ
AccAddress1---Null
Target Fields should be populated as below
Line1---DEF
Line2---STU
Line3---XYZ
Line4---Null
Line5---Null
Line6---Null
The similar way The target values should be assigned a non-null value from source as per the availability in a sequential manner.