SSIS Check Data Load

Posted on 2013-09-06
Medium Priority
Last Modified: 2016-02-11
Hi. New to SSIS. I have an  SSIS package. It runs and loads data from an Access db to a SQL server db.
The package is currently working but I would like it to check a flag in a table for a 1 or 0 at the start to see if it should continue. If not I'd like to go to an alternate path. Just basic logic.
I thought maybe I could load the flag value into a variable but I can't figure out how. Does anyone have any ideas. I've been hitting my head against the wall for a day now. Can't believe I can't see a way to do what should be a really simple task. I can think of some really ugly ways to do it but I'd like to see what other people are using before I delve into that nightmare.
Question by:stopher2475
  • 2
LVL 66

Accepted Solution

Jim Horn earned 2000 total points
ID: 39470829
Assuming the Access db is a connection, you should be able to create an Execute SQL Task that contains the SQL to grab that flag, set the Result Set to Single Row, then in the Result Set dialog store the results in a variable.

Then double-click on the arrow going from that task to the next one, choose 'Expression and Constraint', choose 'Logical OR', and enter an expression that goes something like this:

@sYourVariable=="Some Value"

Open in new window

Then the 'alternate path would be another arrow, with an expression that uses == "Some other Value" instead of "Some Value".

Warning:  SSIS expression language is not abundantly intuitive.

Author Closing Comment

ID: 39471134
Perfect. Tested it out and I'm in business.
LVL 66

Expert Comment

by:Jim Horn
ID: 39471149
Thanks for the grade.  Good luck with your project.  -Jim

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Implementing simple internal controls in the Microsoft Access application.
Audit trails are very important in any system to hold people responsible for certain transactions and hold them to take ownership of their actions. This article is dedicated to all novice "Microsoft Access" developers.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

624 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