June 11, 2019 at 12:22 pm
Hi,
i read a JSON-File into a var.
SELECT @JSON = BulkColumn FROM OPENROWSET(BULK 'C:\Tmp\MyJson.json', SINGLE_CLOB) AS j;
The Json looks like this:
{
"d": {
"results": [
{
"__metadata":
{
"id": "http://xxxx('900000856')",
"uri": "http://xxxx('900000856')",
"type": "businessPartner"
},
"businessPartnerNumber": "1111111111",
"origin": ""
},
{
"__metadata": {
"id": "http://xxxx('1000002000')",
"uri": "http://xxxx('1000002000')",
"type": "Z_AZURE_SRV.businessPartner"
},
"businessPartnerNumber": "2222222222",
"origin": "AL"
}
]
}
}
My Code returns NULL 🙁 . Can you tell me, what's wrong with my json.path?
SELECT *
FROM
OPENJSON(@JSON)
WITH
(
businessPartnerNumber VARCHAR(200) '$.results.businessPartnerNumber'
,origin VARCHAR(200) '$.results.origin'
);
Thanks
Regards
Nicole
June 12, 2019 at 1:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply