"WITHIN GROUP" order clause is not supported for STRING_AGG aggregate
henrik_ffc
Posts: 11 Bronze 2
in SQL Prompt
SQL Prompt reports an error when I try to format a statement including STRING_AGG with the optional WITHIN GROUP order clause
(https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql)
(https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql)
// Henrik
Tagged:
Answers
Thank you for reporting this!
We have reproduced the issue and have created a ticket for this issue(ref SP-6847).
Regards,
Fabiola
Thank you for reporting this issue.
What version of Prompt are you on? Normally, the issue has been fixed starting with version 9.1.4. (SP-6847)
Can you try downloading the latest version?
Thank you for letting us know if it works for you now.
Kind regards,
Fabiola
I would expect STRING_AGG to be treated in the same way as RANK:
I don't get an error, I just don't get the expected result when I "Format SQL".
Thanks for your post.
Can you try 9.1.7 below please?
ftp://support.red-gate.com/patches/SQLPrompt/11Apr2018/SQLPrompt_9.1.7.4764.exe
Best
Richard Lynch.
Redgate Software
I get the same result:
Thanks for posting.
We've logged this issue as SP-7078, so please keep an eye on the release note!
Thanks.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Thanks! You are right! I've closed SP-7078. Sorry for it. Hi @wolfixx, please note SP-6941 as the bug reference and keep an eye on the release note!
Tianjiao Li | Redgate Software
Have you visited our Help Center?
I'll double check it with the dev team and update here shortly.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
I'll double check it with the dev team and update here shortly.
Tianjiao Li | Redgate Software
Have you visited our Help Center?