May 20, 2008 at 8:08 am
I've got a SQL Task that resurns a recordset into variables which are a Serial and and DateTime datatype ...
I want to use these varialbes to search a table and if these exist I want to NOT insert the batch where the variables are inserted in the preceding SQL Task ... avaoiding the next SQL task and just carry on ...
Is this possible :unsure:
MCITP: Database Administrator 2005
MCTS SQL Server 2008
MCP SQL 2012/2014
MCSA SQL Server 2012/2014
MCSE Data Management and Analytics
May 20, 2008 at 11:48 am
Are you doing this as part of a Change Data Capture process for a loading a Data Warehouse? If so this is covered in many books and online articles...
For a simple answer to your question here is what I suggest:
Add a lookup task to check if the values already exist in the table. Add the output of that to a new column, 'proceedflag' for example, then in your precedence constraint add a condition that your new column 'proceedflag' must equal some value (eg. 1) in order to proceed.
Hope this helps....
Ben Sullins
bensullins.com
Beer is my primary key...
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy