{
"Name": ["dokumen_1","dokumen_2","dokumen_3","dokumen_4"],
"Date": [0,0,0,0],
"Progress": [0,0,0,0]
}
I want to fetch Date
and Progress
value according to Name
position.
{
"Name": ["dokumen_1","dokumen_2","dokumen_3","dokumen_4"],
"Date": [0,0,0,0],
"Progress": [0,0,0,0]
}
I want to fetch Date
and Progress
value according to Name
position.
2
Answers
I changed the
date
andprogress
values for a better illustrationNOTE: in 2016 the JSON_VALUE has to be a literal
Example
Results
Another possible approach is a combination of
OPENJSON()
with default schema and appropriateJOIN
s. Of course, you need at least SQL Server 2016 to use the built-in JSON support.