Link to home
Start Free TrialLog in
Avatar of SQLSearcher
SQLSearcher

asked on

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
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

<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.
Avatar of SQLSearcher
SQLSearcher

ASKER

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found my own solution.