SSIS Check Sales amount and Bank amount is within 10%

Hello Experts Exchange
I have two tables one with Sales amount and a second table with banked amount.

I have written a SSIS package to see when these figures match, but I now need to check if these figures are with 10% of each other.

How do I do this within a SSIS package?

Regards

SQLSearcher
SQLSearcherAsked:
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 HornSQL Server Data DudeCommented:
<Knee-jerk reaction>

Since you're testing data in tables, why not create a Stored Procedure that does this testing and returns a value of Success/Fail (or whatever floats your boat).  

Then in SSIS add an Execute SQL Task to run this SP and store the return value in a variable  Then in the following Precedence Constraint (aka green arrow) test this value and map the package flow accordingly.
SQLSearcherAuthor Commented:
Hello Jim
Sorry I did not mention that I have a Derived Column that works out the till date and checks for bank holidays to do the matching.

So I need to keep it within the same data flow.

Regards

SQLSearcher
Jim HornSQL Server Data DudeCommented:
There's really no way to answer this unless you show us screen shots of your SSIS package, and some sample data.
SQLSearcherAuthor Commented:
Hello Experts Exchange
I worked it out by using a Lookup to link the data and then a derived column to compare the two fields.

Regards

SQLSearcher

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
SQLSearcherAuthor Commented:
Found my own solution.
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 SQL Server

From novice to tech pro — start learning today.