Lynn Pettis - Thursday, October 19, 2017 12:09 PM
Thanks for your reply. The reason I did not delete first because there is a constraint on table_a, and I have to delete the data after all update/delete in the process has been done.
Thanks for clarification that during the process the data can be updated by different query from different App. I am not comfortable with locking the table because it will create a queue where the other process will need to wait until this stored procedure has been completed. The SP could run more than 10 minutes. During the 10 minutes, I do not want the other app waiting. Instead, I want the system answer just return an answer to the user saying "do not update this data" or "the data is not available for the update in the next x minutes"