Stored Procedure :- Loop with in an INSERT ..... SELECT
463507Apr 5 2006 — edited Apr 5 2006INSERT INTO SCHEMA_ONE.STATE_ONE(STATE_NAME)
SELECT STATE_NAME FROM SCHEMA_TWO.STATE_TWO
the above query is a batch insert. but I want to insert row wise data. For that I want to put above query with in the For Loop and catch exception if there are any failures due to data mismatch. Also if an exception occurs rather than stopping the execution I want to catch the exception and continue with the remaining rows insert.
Can any one give me a stored procedure for the above operation
please assist me