Hi
I am writing a trigger to write updated in a table to a History table. On the history table, there is a HistorySequence number for each instance of a record from the original table.
In the trigger, I need to get the largest HistorySequence already entered, and update. Then I can insert the new History record with the correct HistorySequence. I would like to lock the History table for this process so that the sequence number stay in synch.
Can anybody tell me how I should do this?
Thanks.
I am writing a trigger to write updated in a table to a History table. On the history table, there is a HistorySequence number for each instance of a record from the original table.
In the trigger, I need to get the largest HistorySequence already entered, and update. Then I can insert the new History record with the correct HistorySequence. I would like to lock the History table for this process so that the sequence number stay in synch.
Can anybody tell me how I should do this?
Thanks.