SSIS Check Sales amount and Bank amount is within 10%

SQLSearcher
SQLSearcher used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jim HornSQL Server Data Dude
Most Valuable Expert 2013
Author of the Year 2015

Commented:
<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.

Author

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 Dude
Most Valuable Expert 2013
Author of the Year 2015

Commented:
There's really no way to answer this unless you show us screen shots of your SSIS package, and some sample data.
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

Author

Commented:
Found my own solution.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial