SSMS 18.1 - Export Data-tier application - Error "contains a statement that is not supported on Microsoft Azure SQL Database v12."
In SSMS 18.1 the export of our database to a bacpac fails with the error:
"Error SQL46010: Procedure: [dbo].[SPReportGetMemberData] contains a statement that is not supported on Microsoft Azure SQL Database v12. The specific error is: Incorrect syntax near concat."
I narrowed it down to our use of OPENJSON, in particular in this fragment of the SP:
OPENJSON(wtd.Config, concat('$.elements', '.', AllElements.[key], '.values'))"
It seems the export does not like that we're using a variable as the path parameter to OPENJSON.
But that is supported as of SQL Server 2017 (our DB compatibility level is 140 and the SP works).
"In SQL Server 2017 (14.x) and in Azure SQL Database, you can provide a variable as the value of path."