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
91 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 65

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

737 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