I have a column myColumn
in myTable
table with this value:
"6285":[
{
"75963":{"lookupId":"54","value":"0","version":null},
"75742":{"lookupId":"254","value":"991","version":null}
}
]
I need to write select
query using JSON_VALUE
or JSON_QUERY
functions (my sql server
version does not support OPENJSON
). The query should return this result:
"75963-0, 75742-991"
As you can see I need values of value
parameter. Also note that I don't know what elements will an object inside 6285
array contain. I mean I wouldn't know in advance that there will be 2 elements (75963 and 75742) in it. There could be more or less elements and they could be different of course. However there will always be only one object in 6285
array.
What kind of select
can I write to achieve it?