Formatting T-SQL code that references this aggregate like below
Code: Select all
select Val = System.agg_CommaJoin(distinct Q.Col)
from
(
select Col = 'A'
union all select 'B'
) as Q
Error (28,1): Unexpected symbol ')' (U+0029)
Error (13,33): Unexpected symbol '('
Error (13,34): Unexpected symbol 'distinct'
Error (28,1): Unexpected symbol ')' (U+0029)
After removing the keyword "distinct", the formatting is done without errors