Hi @George Menoutis ,
Welcome to Microsoft Q&A!
insert into tableA
select ....
where not exists (select .... from tableA)
Could you please double check above statement or provide the complete statement?
Per my understanding, you could include another table or data set to make this statement more logical.
In addition, you could use set transaction isolation level serializable
and updlock
in your statement if you face any concurrency issue.
You could also use WITH (UPDLOCK, SERIALIZABLE)
instead.
Best regards,
Melissa
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.