SQLSearcher
asked on
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;
I want to run the SQL script on the Script Component data, how do I do that in my SSIS package?
Regards
SQLSearcher
I have a SSIS package that has a Recordset Destination, I then use a Script Component to get the data.
My SQL script is;
SELECT
Sale_Date
, 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
GROUP BY
Sale_Date
, Shop_Ref
I want to run the SQL script on the Script Component data, how do I do that in my SSIS package?
Regards
SQLSearcher
ASKER
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?
Regards
SQLSearcher
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?
Regards
SQLSearcher
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much.
https://youtu.be/wCEVlOwxq-Y