This is part of my code
SELECT
JSON_VALUE (c.value,'$.orderNo') as WebOrderNo,
JSON_VALUE (c.value,'$.orderStatus') as orderStatus,
JSON_VALUE (c.value,'$.createDate') as Date,
JSON_VALUE (c.value,'$.amountSum') as ListTotal,
JSON_VALUE (c.value,'$.discount') as discount,
JSON_VALUE (c.value,'$.user.email') as WebEmail,
JSON_VALUE (c.value,'$.user.name') as OrderingAgent,
JSON_VALUE (c.value,'$.user.phone') as WebPhone,
JSON_VALUE (c.value,'$.user.dealerID') as ShipToID,
JSON_VALUE (p.value,'$.quantity')as quantity,
JSON_VALUE (p.value,'$.amount')as ExtendedPrice,
JSON_VALUE (p.value,'$.LineNumber')as LineNo,
JSON_VALUE (p.value,'$.Category')as Category,
JSON_VALUE (p.value,'$.attributes."Side Stile Width"')as SSD,
I get error:
Incorrrect syntax near 'LineNo'. Expecting ID, QUOTED_ID, etc. JSON_VALUE (c.value,'$user.name') as LineNo
However, if I change it to
JSON_VALUE (p.value,'$.LineNumber')as LineNumber,
The error goes away.