?
Solved

Testing for records and if found execute next task using SSIS

Posted on 2013-06-24
5
Medium Priority
?
221 Views
Last Modified: 2016-02-11
I use SSIS to perform ETL process and some times the client sends new or unknown files.  I do have a table that captures the unknown file information and have a SP that checks the table at the conclusion of the process.  How can I execute the previous package only if there is a unknown file?  I thought that I would execute a SQL TASK basically doing a coun(*) for any files that appeared today and if > 0 it would flow through the SSIS package that sends me the list of file.  If the value is = 0 then don't execute the next package.

Have I confused you enough?
0
Comment
Question by:wdbates
[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
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39274636
"Have I confused you enough?"

Yes you have...  Could you say that with an image please?

Using the SQL task with a SELECT COUNT(*) is indeed an option.  You could have the single-value result set assigned to a package variable and then use that variable on the precedence constraint (the green connector).  That's for Control Flow.

In case you're in a Data Flow I'd advise to use the Lookup component.  With that you can look up any existing records and split the incoming data according to what's found or not.

Now, did I manage to get you confused? :)
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 1200 total points
ID: 39274647
In addition to previous msg: to edit the precendence constraints, double-click the green connector.  Now change the Evaluation operation to Expression and Constraint.  That allows you to enter an expression like @[MyVariable] == 0
0
 

Author Comment

by:wdbates
ID: 39284564
Sorry for the delay, but been out of the country.  Will check later today if I have time.
0
 

Author Closing Comment

by:wdbates
ID: 39297910
Sorry for the delay, but the solution work!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39298247
Cool! :)
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

770 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