I am automating a lot of our processes using SQL Compare, SQL Data Compare, and SQL Source Control (amongst other tools,) and have found a feature that I would really like to see in SQL Compare. I don't think it IS available, and if not am wondering if there are plans for it to be a future feature.
Namely, when I am using Data Compare to script inserts to lookup tables, I would love to be able to specify that the script should check for the existence of the data, by key field, before attempting an insert.
For example, the data scripts include statements like these:
INSERT INTO [staging].[SysImportExceptionTypes] ([Id], [Description], [SysImportExceptionSeverity_Id]) VALUES (11, N'SQL code not available For Import', 3)
And I am currently modifying these by hand to look like this:
IF NOT EXISTS (SELECT * FROM [staging].[SysImportExceptionTypes] WHERE ID = 11) INSERT INTO [staging].[SysImportExceptionTypes] ([Id], [Description], [SysImportExceptionSeverity_Id]) VALUES (11, N'SQL code not available For Import', 3)
Is that something that I can get the tool to do without this manual intervention? If not, any chance of it being in a future release?
Namely, when I am using Data Compare to script inserts to lookup tables, I would love to be able to specify that the script should check for the existence of the data, by key field, before attempting an insert.
For example, the data scripts include statements like these:
INSERT INTO [staging].[SysImportExceptionTypes] ([Id], [Description], [SysImportExceptionSeverity_Id]) VALUES (11, N'SQL code not available For Import', 3)
And I am currently modifying these by hand to look like this:
IF NOT EXISTS (SELECT * FROM [staging].[SysImportExceptionTypes] WHERE ID = 11) INSERT INTO [staging].[SysImportExceptionTypes] ([Id], [Description], [SysImportExceptionSeverity_Id]) VALUES (11, N'SQL code not available For Import', 3)
Is that something that I can get the tool to do without this manual intervention? If not, any chance of it being in a future release?