Error handling in Insert
Posted on 2013-01-31
I am trying to load a table using Insert statement.
My script will insert fine for the first time and when I run the same script once again, I ll get an error saying cannot insert duplicate values ( I have two columns and both are primary keys, so I cant insert duplicate values )
Is there a way to re-write it so that when I insert the second time and if there are any new records, it will insert them and the rest wont be inserted.
CAN WE DO THIS WITHOUT USING UPSERT/MERGE ??