Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have table bellow, the code for CCC is empty, my need is : if type is '3', then show the code of the same customer where type is 1 .
| CUSTOMER | NAME | TYPE | CODE | 
| FFF | AAA | 1 | 101 | 
| FFF | AAA | 1 | 102 | 
| FFF | BBB | 2 | 202 | 
| FFF | CCC | 3 | |
| FFF | AAA | 1 | 103 | 
The final table will be like bellow
| CUSTOMER | NAME | TYPE | CODE | 
| FFF | AAA | 1 | 101 | 
| FFF | AAA | 1 | 102 | 
| FFF | BBB | 2 | 202 | 
| FFF | CCC | 3 | 101 | 
| FFF | CCC | 3 | 102 | 
| FFF | CCC | 3 | 103 | 
| FFF | AAA | 1 | 103 | 
how to proceed?
Hi,
You can try something like the attached text file within your script.
Hope this helps.
Hi,
Try like this
Data:
LOAD
CUSTOMER,
NAME,
TYPE
IF(TYPE= 3, '103', CODE) AS CODE
FROM DataSource;
Regards,
Jagan.