Solved

How to stop data flow SSIS when there is a lookup match output and carry on when No Match Output

Posted on 2016-08-22
2
103 Views
Last Modified: 2016-08-22
Hello ,

I have a SSIS package that imports data from spreadsheet into temp table by checking if the data ( year column ) doesn't exist in destination table then will insert data into table. I would like the package to stop if it finds a matching year in destination table.

what the data flow looks like
Excel Source --> Data Conversion --> Lookup --> OLE DB Destination


Kind regards
0
Comment
Question by:deanmachine333
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 41765211
>I would like the package to stop if it finds a matching year in destination table.
I'm not aware of any control that does a 'Stop the package if this expression happens', so what you could do is

  • Add a Row Count control after the lookup, assigning that row count to a variable (e.g. your_variable)
  • Add a precedence constraint (aka green arrow) immediately after the data flow task in question,with an expression of something like @[your_variable} == 0, which would mean that processing would only continue if that variable contained a zero.
0
 

Author Closing Comment

by:deanmachine333
ID: 41765241
thanks i have added this in the Control Flow.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question