STRING_AGG Not Recognized on V15.0.2 of SQL Server LocalDB I recently coded a stored procedure on SQL Server 2019 (14.0.3192.2) in AWS that utilized the function STRING_AGG with no issues. When I moved the code to my local test db it complained about that method.
Upon research I proceeded to update my local sql server db service from 14.x version to the latest 15.0.2 and tried to install the sproc again; to the failure

Incorrect syntax near '&quot;'',STRING_AGG(ActionDATE, ''&quot;,&quot;''),''&quot;'.

This feature has been viable since SQL Server 2017...so being missing in the local version of 2019 is somewhat puzzling.
Question
What recourse do I have besides installing SQL Server 2019 Developer edition to resolve this issue?

Intention
Note that the failure line with STRING_AGG is trying to create a JSON sub array of dates such as
[ '01/24/2020', '01/28/2020' ]:
Code
CREATE PROCEDURE [hcwfba].[GetOperationsAndActionDates] 
    @operationId int,
    @locationId int  
AS       

WITH  [DATA] AS (SELECT DISTINCT id_Operation, id_Location , CONVERT(varchar, ActionDATE ,101) AS [ActionDATE] FROM OperationDetail)

SELECT distinct 
         PD.id_Operation
       , PD.id_Location
       , JSON_QUERY((SELECT CONCAT(''[&quot;'',STRING_AGG(ActionDATE, ''&quot;,&quot;''),''&quot;]'') FROM [DATA] DT2 WHERE DT2.id_Location = PD.id_Location)) As Dates
FROM [DATA] PD
WHERE PD.id_Operation = @operationId 
AND PD.id_Location = @locationId
FOR JSON AUTO;

RETURN @@ROWCOUNT 

JSON Result
[
    {
        &quot;id_Operation&quot;: 13,
        &quot;id_Location&quot;: 8675309,
        &quot;Dates&quot;: [
            &quot;12/03/2018&quot;,
            &quot;08/27/2018&quot;,
            &quot;10/22/2018&quot;
        ]
    }
]
Per my comments: Have you tried to use the STRING_AGG() function with a very simple test case to confirm it's an issue with the function and not your syntax in your main query?
It seems your syntax was not formatted properly, rather than the STRING_AGG() function not being available on your instance version.