I'm looking at about 13,000 rows in a SQL Server table, and trying to parse out certain values within one column that is stored as json.
The json column values look something like this:
..."http://www.companyurl.com","FoundedYear":"2007","Status":"Private","CompanySize":"51-200","TagLine":"We build software we believe in","Origi...
I'd like to extract the value for "CompanySize", but not all rows include this attribute. Other complicating factors:
- I'm not sure how many possible values there are within the "CompanySize" parameter.
- "CompanySize" is not always followed by the "TagLine" parameter.
The one rule I know for certain: the CompanySize value is always a string of unknown length that follows the varchar string "CompanySize":" and terminates before the next "," string.
Ideally we would have upgraded fully to SQL Server 2016 so I'd be able to take advantage of SQL Server's JSON support, but that's not the case.