JSON_OBJECT causes Incorrect syntax near ':'.

While trying to deploy a DB project using a PS1 script the following error occurred: "Incorrect syntax near ':'"

'JSON_OBJECT( ''DemographicID'':1 ABSENT ON NULL) as payload'
Using the above string in the creation of a dynamic INSERT command causes the error.

I have tried numerous ways to work around this, but any attempt fails with the about error.
The colon is required for the JSON_OBJECT() function to work.

It deploys fine when using the SCA extension from within Visual Studio, but when we try to automate it with the PS1 it fails on this line:

$validatedProject = Invoke-DatabaseBuild $project 

IS there any solution to this?
Tagged:

Answers

Sign In or Register to comment.