Surrogate Key -- Database Sequence
Posted: Thu Mar 10, 2011 3:51 am
Dear all,
Two questions:
1. I could establish the Surogate key generation through flat file. Can you explain how to generate it through DB2 sequence.
2. I have a scenario:
Input : Dataset -- 2 million records contains (empname,esal)
In target DB2 table say EMP (empid is a sequence generator).
For every record in dataset, i want to capture the sequence number plus the value of employee in another dataset without inserting it into the target table..
so my target dataset should be (empid generated sequence no from table, empname, esal)
Can you explain me how to achieve this in parallel.. Thank you..
Two questions:
1. I could establish the Surogate key generation through flat file. Can you explain how to generate it through DB2 sequence.
2. I have a scenario:
Input : Dataset -- 2 million records contains (empname,esal)
In target DB2 table say EMP (empid is a sequence generator).
For every record in dataset, i want to capture the sequence number plus the value of employee in another dataset without inserting it into the target table..
so my target dataset should be (empid generated sequence no from table, empname, esal)
Can you explain me how to achieve this in parallel.. Thank you..