string concatenate in group by function with other aggregate functions

后端 未结 3 1901
旧时难觅i
旧时难觅i 2021-01-05 08:24

Is it possible to concatenate strings with one or more of other group by function like sum, avg, count etc .

Say I have the following table

Id Name O         


        
3条回答
  •  温柔的废话
    2021-01-05 09:03

    If you're using MS SQL Server 2005 or newer you can create user-defined aggregate functions.

    MSDN: CREATE AGGREGATE (Transact-SQL)

    MSDN: Invoking CLR User-Defined Aggregate Functions

提交回复
热议问题