Saturday, November 3, 2007

Aggregating Correlated Sub-Queries

Every now and then you may attempt to calculate an aggregate function -- such as SUM() -- on a correlated subquery, only to encounter the following error:Msg 130, Level 15, State 1, Line 24Cannot perform an aggregate function on an expression containing an aggregate or a subquery.This can be a tricky situation to resolve depending on how yo

read more | digg story