The following functions were introduced in SQL Server 2017.
Question: How come they don't work in Visual Studio 2017?
SQL72014: .Net SqlClient Data Provider: Msg 195, Level 15, State 10, Procedure uspStoredProc1, Line 6 'STRING_AGG' is not a recognized built-in function name.
Answer: Visual Studio 2017 ships with SQL Server 2016 for LocalDb by default and therefore it does not support these new functions that exist in SQL 2017.
To resolve this, upgrade your LocalDb version to SQL Server 2017 Express LocalDb
To obtain SQL 2017 LocalDb do the following:
- Access this site: https://my.visualstudio.com/downloads and locate SQL Server 2017 Express download
- Change the drop-down to OTH and hit Download.