Custom Aggregations
Custom aggregations are aggregations that are not provided as built-in aggregate functions—for example, concatenating strings, calculating products, performing bitwise manipulations, calculating medians, and many others. In this section, I’ll provide solutions to several custom aggregate requests. Some techniques that I’ll cover are generic—in the sense that you can use similar logic for other aggregate requests—while others are specific to one kind of aggregate request.
More Info
One of the generic custom aggregate techniques uses cursors. For details about cursors, including handling of custom aggregates with cursors, please ...
Get Inside Microsoft® SQL Server™ 2005: T-SQL Querying now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.