I am using the SQL Server 2008 Management Studio Generate Scripts... wizard to generate data only scripts for various tables in my database.
The problem is it generates a bunch of insert statements, but doesn't include any kind of if exists logic. So, I'm getting primary key exceptions for the records that already exist.
Does anyone know of a way to script the data in a table such that it checks if the record already exists or not?