arvind baldaniya

arvind baldaniya

  • NA
  • 339
  • 140.4k

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":"www.url.com","Icon":"some_icon","Facebook":"Fa_url"}  Test123
 222 {"URL":"www.url.com","Icon":"some_icon", Facebook":"Fa_url"}  test123
 
I need to this formate 
 
 id     URL  Icon  Facebook  Google  Other
 122  www.abc.com     Some_icon  Facebook_url  abc  test123
 222  www.abc.com  Some_icon  Facebook_url  abc  test123
 

Attachment: Capture.rar

Answers (8)