SSIS sum of column

This should be fairly easy for you SSIS pros.. I'm kind of new to it.. I have a OLE DB Source Editor that runs the code below and puts the result into a table in SQL(another OLD DB Source).. The only thing I have inbetween the two OLE DB Source editors now is a data conversion transformation editor..... I need to add something else in between that checks the sum of all [current_onhand] and if 0 then fail the package.. If sum [current_onhand] <1 then.... I would like to avoid the VB script task thing because I'm not a VB person if at all possible.. I'm using visual studio 2008.. Is there a componite to check the sum of a colum and then fail if certain condition is met? I want to stick this in between the 2 OLE DB Sources..
SELECT item_id, item, current_onhand, next_supply, next_supply_date, col1,
       col2, col3, col4, col5, creation_date, created_by
FROM sfa.z_item_supply

Open in new window

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.

cheryl9063Author Commented:
I need help with this.. Not just a link to other sites for me to read.. I put this in the conditional split and I'm getting the error the function sum is not recognized when I try to click the configure error output.

see attached screen print

SThayaTechnical MAnagerCommented:

  The condition Split transformation will not support the "Sum" function name .
  it will do the row by row  value split ups.

for your case you can use Aggregate  tranformation before the Conditional split , then based on the output data  from Aggregate tranformation you can split your data ....

Note :

based on the above code

sum([CURRENT_ONHAND])<1-- this will not work
([CURRENT_ONHAND])<1-- this will work

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
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
Web Languages and Standards

From novice to tech pro — start learning today.

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.