asked on
SELECT tbl.*
FROM OPENROWSET (BULK 'C:\SomeFile.json', SINGLE_CLOB) js
CROSS APPLY OPENJSON(BulkColumn)
WITH
(
v NVARCHAR(MAX) '$.results' AS JSON
)
cross APPLY OPENJSON(v)
WITH
(
[v] int,
[vw] decimal(15,5),
[o] decimal(15,5),
[c] decimal(15,5),
[h] decimal(15,5),
[l] decimal(15,5),
[t] bigint,
[n] smallint
) tbl
[{
"ticker": "VIG",
"status": "OK",
"queryCount": 1571,
"resultsCount": 1571,
"adjusted": false,
"results": [{
"v": 117,
"vw": 112.0438,
"o": 112,
"c": 112,
"h": 112,
"l": 112,
"t": 1588330800000,
"n": 5
}