Using Microsoft SQL Server 2016 (RTM) Standard Edition, I am trying load a JSON into a SQL Server table using a SQL Server Agent Job, and get the following error:
JSON text is not properly formatted. Unexpected character '"' is found at position 508. [SQLSTATE 42000] (Error 13609).
But when I run it as T-SQL it inserts the data with out errors.
DECLARE @return_value int,
@responseText nvarchar(MAX),
@json nvarchar(MAX)
EXEC @return_value = [dbo].[HTTPRequest]
@URI = N'http://flexapi.foresightgps.com/ForesightFlexAPI.ashx',
@methodName = N'post',
@requestBody …Run Code Online (Sandbox Code Playgroud)