Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every body
I have the below data in my database :
policy No | Endorsement No |
P1 | |
P1 | E1 |
P2 | |
P2 | E1 |
P3 |
and I want to load it to be like the below table , means if there is a value for P1 take it if not put it as null .
Policy No | Endorsement No |
P1 | E1 |
P2 | E1 |
P3 |
I tried to use Only function but it does not work with me , any one faced this before .
appreciate your help .
May be try this
Table:
LOAD [policy No],
MaxString(If(Len(Trim([Endorsement No])) > 0, [Endorsement No])) as [Endorsement No]
Group By [policy No];
LOAD * INLINE [
policy No, Endorsement No
P1,
P1, E1
P2,
P2, E1
P3,
];
I used If statement to make sure that Endorsement No was forced to be null as I was loading it from an Inline table... but if you have true nulls coming from your source data... MaxString([Endorsement No]) should work for you....