How using try catch to fix the bug and go back to the beginning of the try?

There is a table in which the field idnt_code must be unique and there is another table with which data are transferred in this table, including in the field idnt_code. But it happens that some rows are same value which is already there. I need to catch to get this line to do some manipulation, so she could enroll, record and continue execution of the try. It is clear that the try has already finished his work, so I have to do it again.

is it even possible to work with the construction project, in which the error in the catch?
July 2nd 19 at 13:49
1 answer
July 2nd 19 at 13:51
It is not necessary. This will be individual work with each line and it will brake. And it is necessary to make a selection from heaps of rows to check using exists/in that they do not exist in the target table and from the stack to insert them.

And those that are present in the target, the next step to process and, again, the pack insert.
No try catch is not necessary at all.

Find more questions by tags SQL Server