arvind baldaniya

arvind baldaniya

  • 1.5k
  • 337
  • 71.3k

Convert two columns into key-value json object?

Jul 4 2018 12:33 AM
I am looking for a query with the native functions of SQL Server 2012 to extract the JSON from the column Value, and dynamically create columns, and I want to do this for different columns
I have multiple record 
 ID    Data Other 
 122 {"URL":"","Icon":"some_icon","Facebook":"Fa_url"}  Test123
 222 {"URL":"","Icon":"some_icon", Facebook":"Fa_url"}  test123
I need to this formate 
 id     URL  Icon  Facebook  Google  Other
 122     Some_icon  Facebook_url  abc  test123
 222  Some_icon  Facebook_url  abc  test123

Attachment: Capture.rar

Answers (8)