How to map the data from different column in to one column by using condition
Hi
Can anyone please help on this.
There is a three columns D1,D2,D3. From this columns there are some some nulls and Level2 in D1, Level3 in D2 and Level4 in D3. I need to fetch all this data in to one Column i.e., Driver, Once complete this level,if any one record is blank in Driver then this should fill with last column Driver Name data.
Below script i used, But its taking only D1 data in to Driver not remaining data.
LOAD
if(len(trim(D1))<>0 and (len(trim(D2))=0 or Len(trim(D2))='Level3') and (len(trim(D3))=0 or len(trim(D3))='Level4'), D1,
if((len(trim(D1))=0 or len(trim(D1))= 'Level2') and len(trim(D2))<>0 and (len(trim(D3))=0 or len(trim(D3))='Level4'), D2,
if((len(trim(D1))=0 or len(trim(D1))= 'Level2') and (len(trim(D2))=0 or Len(trim(D2))='Level3') and len(trim(D3))<>0, D3