Hi All,
I have a source table, and i need to generate the below output using Data Services.
Source Table:
Legacy_number | Legacy_name | Address | z_inscope | z_sold_to | z_ship_to | z_invoice_to |
123 | sam | 123 main st | Y | y | N | N |
345 | PAUL | 234 oxford st | y | y | N | N |
345 | PAUL | 234 oxford st | y | n | n | y |
456 | alex | 34 e ave | y | y | n | n |
456 | alex | 34 e ave | y | n | y | n |
456 | alex | 34 e ave | y | n | n | y |
Output Table:
Legacy_number | Legacy_name | Address | z_inscope | z_sold_to | z_ship_to | z_invoice_to |
123 | sam | 123 main st | Y | y | N | N |
345 | PAUL | 234 oxford st | y | y | N | y |
456 | alex | 34 e ave | y | y | y | y |
We nee to generate a table which need to have only single Legacy_number in output table and z_inscope, z_sold_to, z_ship_to,z_invoice_to have to check their values in source table and replaced their columns with the following priority order Y,y,N,n in Output table.
for explanation see below example.
1. for 345 Legacy number we have y & n for z_sold_to column. In output table that column need to be replaced with y as y priority is higher than n.
2. for 456 Legacy number we have n & y & n for z_ship_to column. In output table that column need to be replaced with y as y priority is higher than n.
Thanks in advance.