KeyMgt Function
Posted: Tue May 24, 2011 1:49 pm
Hi All,
I am using one of the Datastage functions which is KeyMgtGetNextValue("abc") where abc is the table name in two jobs . when i run the 1st job its working fine , and then if i run the 2nd job , i am getting an error saying that 'unique constraint violated'. So can we use KeyMgtGetNextValue("abc") in two different jobs or should i need to change the 'abc' to 'def' in 2nd load. Can you please let me know what is the best way to generate a surrogate key value where i am loading Data from different Data in different jobs , so thats why i used KeyMgtGetNextValue("abc") in different jobs but still getting an error when i run the 2nd job after i am done with my 1st job.
Any help is really appreciated
Thanks in advance
I am using one of the Datastage functions which is KeyMgtGetNextValue("abc") where abc is the table name in two jobs . when i run the 1st job its working fine , and then if i run the 2nd job , i am getting an error saying that 'unique constraint violated'. So can we use KeyMgtGetNextValue("abc") in two different jobs or should i need to change the 'abc' to 'def' in 2nd load. Can you please let me know what is the best way to generate a surrogate key value where i am loading Data from different Data in different jobs , so thats why i used KeyMgtGetNextValue("abc") in different jobs but still getting an error when i run the 2nd job after i am done with my 1st job.
Any help is really appreciated
Thanks in advance