SSIS run SQL on Script Component

Hello Experts Exchange
I have a SSIS package that has a Recordset Destination, I then use a Script Component to get the data.

My SQL script is;

    , Shop_Ref
    , ISNULL(SUM(CASE WHEN Category='Cat1' THEN [Price_Paid] END),0) AS Cat1
    , ISNULL(SUM(CASE WHEN Category='Cat2' THEN [Price_Paid] END),0) AS Cat2
    , ISNULL(SUM(CASE WHEN Category='Cat3' THEN [Price_Paid] END),0) AS Cat3
FROM SampleData
    , Shop_Ref

Open in new window

I want to run the SQL script on the Script Component data, how do I do that in my SSIS package?


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Brian CroweDatabase AdministratorCommented:
Maybe this video will help...
SQLSearcherAuthor Commented:
Hello Brian
The script that I want to run is on all the records at once, but the example you have given me is to run on one record at a time.

Is it possible to run a script on a script component?


Brian CroweDatabase AdministratorCommented:
It looks like there might be a work-around to use a RecordSet Destination as a data source:

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:
Thank you very much.
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.