Skip to content

Tag: sql-server

How can I generate JSON results in older SQL Server versions?

I have a table which contains data similar to this. I want to get ItemNames in JSON format as I have mentioned in the expected output below. Expected output: Note: I know in latest SQL Server, there are functions FOR JSON to convert to JSON format but it won’t work in older SQL versions. Therefore, I am…