I have to delete 1000 rows in IN
clause. I wrote a query which contains multiple id's in the WHERE
condition. If any row is throwing a foreign key reference error, the statement should continue on executing.
DELETE FROM CUSTOMERS
WHERE ID IN (1, 2, 3, 4)
If ID = 3
IS referenced by another table, it should not be deleted, but ID = 4
has to deleted.
I tried SMO execute query method with execution type continue on error. The script is not throwing error in code, but none of the data is being deleted.