sattar419 10789 (5/29/2014)
I am trying to use Aggregator transformation to do the sum on one column based on group by on another column, but when i do it i am getting on these two columns in the output records... I have 23 other columns that i want as output column. How to achieve this in ssis.
Below is what i have in my package.
Source which has 25 columns
Aggregator ( group by on column1 and sum on column2)
output ( I need all 25 columns) ?
I can't speak for SSIS but here's how I might do it in T-SQL... that is, if it made sense to do so. The "aggregator" will give you the sum of all Column2s grouped by Column1 and will be repeated for each unique value for Column1 (as in "group").
,Aggregator = SUM(Column2) OVER (PARTITION BY Column1)
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs