Jignesh Kumar

Jignesh Kumar

  • 32
  • 37.3k
  • 2.8m

Get Comma separated values from json field of sql server 2017,

Mar 9 2021 10:58 AM
Here Is my json column, I am looking for "description" values by comma seperated values, I am looking for solution in SQL Server 2017.
  1. "[   
  2. { \"mid\": \"/m/01dvt1\", \"description\": \"Joint\", \"score\": 0.975906968, \"topicality\": 0.975906968 }, { \"mid\": \"/m/0dzf4\", \"description\": \"Arm\", \"score\": 0.9426941, \"topicality\": 0.9426941 },   
  3. { \"mid\": \"/m/01ssh5\", \"description\": \"Shoulder\", \"score\": 0.936277151, \"topicality\": 0.936277151 },   
  4. { \"mid\": \"/m/035r7c\", \"description\": \"Leg\", \"score\": 0.925112, \"topicality\": 0.925112 }, { \"mid\": \"/m/01d40f\", \"description\": \"Dress\", \"score\": 0.920576453, \"topicality\": 0.920576453 },  
  5.  { \"mid\": \"/m/02p0tk3\", \"description\": \"Human body\", \"score\": 0.8836405, \"topicality\": 0.8836405 }, { \"mid\": \"/m/062581\", \"description\": \"Sleeve\", \"score\": 0.8722252, \"topicality\": 0.8722252 },  
  6.  { \"mid\": \"/m/019swr\", \"description\": \"Knee\", \"score\": 0.8650081, \"topicality\": 0.8650081 }, { \"mid\": \"/m/01j04m\", \"description\": \"Thigh\", \"score\": 0.858148634, \"topicality\": 0.858148634 },   
  7. { \"mid\": \"/m/01vm1p\", \"description\": \"Elbow\", \"score\": 0.834722638, \"topicality\": 0.834722638 } ]"  
From Above json field I want to read : description column values by comma seperated,
 
Out put : "Joint, Arm, Shoulder, Leg, Dress, Human body, Sleeve, Knee, Thig, Elbow"

Answers (1)