Functions like STRING_AGG(), CONCAT_WS(), TRIM() Appear to Break in Visual Studio 2017 Database Projects
Published Feb 10 2019 05:24 PM 22.2K Views
Microsoft

First published on MSDN on Mar 05, 2018
The following functions were introduced in SQL Server 2017.

STRING_AGG()

 

CONCAT_WS()

 

TRIM()

 

TRANSLATE().


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:

    1. Access this site: https://my.visualstudio.com/downloads and locate SQL Server 2017 Express download

 

    1. Change the drop-down to OTH and hit Download.

 

    1.  











Namaste!

Joseph

Version history
Last update:
‎Feb 11 2019 09:08 PM
Updated by: