HI,
I Have below table and it has different actions and indicator.
NAME | DATE | ACTION | INDICATOR |
ABC | 5/16/2014 | A | Y |
ABC | 5/17/2014 | B | Y |
AAA | 5/18/2014 | A | N |
AAA | 5/18/2014 | B | Y |
AAA | 5/19/2014 | C | Y |
BGD | 5/20/2014 | A | N |
BGD | 5/21/2014 | B | N |
From this table i want to create a table below using above data
NAME | ACTION A date | ACTION C Date |
ABC | 5/16/2014 | - |
AAA | - | 5/19/2014 |
BGD | - | - |
Here we take ACTION A date - if ACTION = A and INDICATOR=Y
and ACTION B date- if ACTION = B and INDICATOR=N
i want to display the name if a record doesn't satisfy above conditions.
Please help me to solve this
Thank You.
Hi Anuradha,
Pls check this app
Logic needs to be done in the Load Script
Table1:
LOAD * INLINE [
NAME, DATE, ACTION, INDICATOR
ABC, 5/16/2014, A, Y
ABC, 5/17/2014, B, Y
AAA, 5/18/2014, A, N
AAA, 5/18/2014, B, Y
AAA, 5/19/2014, C, Y
BGD, 5/20/2014, A, N
BGD, 5/21/2014, B, N
];
Table2:
LOAD NAME,
if(ACTION='A' and INDICATOR='Y',DATE) as [ACTION A DATE],
if(ACTION='B' and INDICATOR='Y',DATE) as [ACTION B DATE],
if(ACTION='C' and INDICATOR='Y',DATE) as [ACTION C DATE]
Resident Table1;
//drop Table Table1;
Thanks,
Sri
or in the front end:
hope this helps
regards
Marco
Please mark as answered if there are no further questions
thanks
regards
Marco