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

Incremental Key in Group

$
0
0

Hi,

 

I need help to get the solution of following scenario:

 

I have table with 4 primary key : PK1,PK2,PK3,PK4.

 

Input table :

 

PK1PK2PK3PK4
T1abc
T1bcd
T2bcd
T2abc

 

 

1st load I need to generate the count as per PK1.

 

PK1PK2PK3PK4Count
T1abc1
T1bcd2
T2bcd1
T2abc2

 

 

 

2nd load will be delta load,

 

If i will get input table like :

 

PK1PK2PK3PK4
T1def
T2bcd
T2abc

 

I should get output like:

 

PK1PK2PK3PK4Count
T1abc1
T1bcd2
T1def3
T2bcd1
T2abc2

 

 

 

Any help will be much appreciated.

 

Thanks in advance.

 

Warm Regards,

Amit


Viewing all articles
Browse latest Browse all 4013

Trending Articles



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