16
Views
2
Comments
[Dynamic LINQ] String_Agg function missing
Question
dynamic-linq
Web icon
Forge asset by Wei Zhu
Application Type
Traditional Web

Hi Guys. I've been able to write query text successfully using Sum or Max aggregate functions. When using String_Agg i get an error that it doesn't exist. Is it possible to use it? Could it be added? Thanks.

UserImage.jpg
Mark Jurkovich

oh is this because I have sql server 2016? String_Agg came in 2017 i think. I don't know what Dynamic Linq is doing but if it runs sql on my db in temp tables or something then it makes sense that string_agg is missing.

2025-07-22 10-30-27
Mandar Deshpande

Hi @Mark Jurkovich 

You are correct. STRING_AGG requires SQL Server 2017+ and hence Dynamic LINQ cannot use it in your Traditional Web App.

In your case, you can use the old XML Path technique to simulate string aggregation.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.