lijun
Aggregation SUM adds the numbers together. Is there a similar aggregation function that returns the product of all the numbers
Thanks
Transact-SQL
No, there is no built-in PRODUCT aggregate. One thing you could try is taking the exponent of the sum of the logs of the individual rows; however, this will tend to cause arithmetic execution errors if any of the individual rows have zero for a value.
Here is a similar discussion:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=355075&SiteID=1