SQLTeam.com | Weblogs | Forums

How to parse json data in SQL server 2012?

I am using sql server 2012.I have been assigned a task where one of my column(JsonText) of table(Sample) contain json data.I want to parse that data and insert into columns of another table(Test).I searched on net 'openjson'is supported in sql server 2016.How to do in sql server2012.

Table1 : Sample
Id JsonText Active

webaddress?{'data':'{"PId": "XXXX","Status": "YES","Name":"XXX","Address":"XXXX","MobileNumber":"xxx"}'}

I am intrested only 'PID,Address,MobileNumber' columns not all.

Table Test structure like this

A quick google got this: https://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/