i used a stored procedure to insert a record into another table and after inserting, i delete the record from the current table without using IFs.

If i run the stored procedure and i stop it a few times to simulate a failed job the records will all be deleted but not all of them will be inserted into the other table.

Have been trying this for quite some time... If i use IF statements to compare the values before deleting not all the records will be inserted.

Anyone have any idea on this? thanks