Red Gate forums :: View topic - Check for Existence of Lookup Data
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Check for Existence of Lookup Data

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
todtrexler



Joined: 22 Nov 2013
Posts: 3

PostPosted: Fri Nov 22, 2013 8:14 pm    Post subject: Check for Existence of Lookup Data Reply with quote

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?
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 205

PostPosted: Fri Nov 22, 2013 9:53 pm    Post subject: Reply with quote

Unfortunately the tool does not currently have this capability.
There is an existing feature request you may want to vote for.
http://redgate.uservoice.com/forums/147879-sql-data-compare-feature-suggestions/suggestions/2795870-add-if-not-exists-to-data-compare
These forums are actively monitored by our development team and allow our users to request features and vote on them.
If a feature receives a significant amount of votes or is deemed to have merit development may include the feature in a future release.
_________________
Manfred Castro
Product Support
Red Gate Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group