Hi i am looking for the best way to do an Insert/Update within a Stored Procedure for a lot of records, a cursor would be way to slow, so i was hoping i could do a "Insert - Select From" and then have a trigger to rollback the record if it already existed and then update just after the rollback
is there a better way of doing this? i am using SQL 2014
Hi Thanks for the reply, that will stop the duplicates which i understand, what I need to do though is if an insert has a duplicate ID then instead of inserting which would fail, it then updates the other columns.