JSON_OBJECT causes Incorrect syntax near ':'.
TedW
Posts: 1 New member
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?
'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
I'm going to reach out via a support ticket to investigate this one!
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?