Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

How to achieve the below output

$
0
0

Hi All,

    I have a source table, and i need to generate the below output using Data Services.

 

Source Table:


Legacy_numberLegacy_nameAddressz_inscopez_sold_toz_ship_toz_invoice_to
123sam123 main stYyNN
345PAUL234 oxford styyNN
345PAUL234 oxford stynny
456alex34 e aveyynn
456alex34 e aveynyn
456alex34 e aveynny


Output Table:


 

Legacy_numberLegacy_nameAddressz_inscopez_sold_toz_ship_toz_invoice_to
123sam123 main stYyNN
345PAUL234 oxford styyNy
456alex34 e aveyyyy


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.


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>