SSIS Check Data Load

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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stopher2475Author Commented:
Perfect. Tested it out and I'm in business.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.