Thanks for your reply. I am using the following method to generate primary key
Begin Transaction
SELECT PKTable
RLOCK()
Replace PK_Type_Field with PK_Type_Field + 1
lnNewPK = PK_Type_Field
* insert/update/etc
* first Master table with lnNewPk
* then Child table with lnNewPK
* Now Rollback / Commit
SELECT PKTable
UNLOCK
END TRANSACTION
if I use the identity column as my primary key then how can I generate my Alternate Key as the above. What is the T-SQL for above code?
TIA
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only