-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
fixed-pending-releaseFix in upcoming releaseFix in upcoming release
Description
Version - 170.121.2
Parser - TSql170Parser
When WITH ARRAY WRAPPER
is used inside JSON_QUERY
it does not get parsed with above mentioned parser version and details.
Steps to reproduce -
Try parsing the below SQL script with the parser:
SELECT JSON_QUERY(@j, '$.credit_cards[*].type' WITH ARRAY WRAPPER ) as credit_card_types;
Note : Example used is available on Microsoft documentation here
Example -
static void Main(string[] args)
{
var script = "<Example Script>";
var parser = new TSql170Parser(true, 0);
var fragment = parser.Parse(new StringReader(script), out var parseErrors);
if (parseErrors.Count > 0)
{
Console.WriteLine(parseErrors[0].Message);
}
}
Error message :-
Incorrect syntax near 'WITH'.
Metadata
Metadata
Assignees
Labels
fixed-pending-releaseFix in upcoming releaseFix in upcoming release