views:

49

answers:

1

I'd like to have a way to get the sum of a field stored into a variable from inside a dataflow task. The rowcount transform does this, but I can't see how to use any other aggregate functions. Is scripting a transform component my best bet?

A: 

Try Multicasting the data flow and sending one path to an aggregate task (whereafter you can assign the value to the variable), and continue the flow on the other path.

revelator
That's what I was originally thinking, but how do I get the final value of that field after all rows have processed into a variable?
JSacksteder
You can use a Script Component to assign the value to a variable, something like...Dts.Variables("AggregatedValue").Value = Row.YourAggregatedValue
revelator

related questions