Forum Discussion
brunosimoes
May 09, 2024Copper Contributor
FOR JSON AUTO Query returning broken headers
Hello all, I wanted to confirm if there's anything I'm doing wrong or if this is actually a bug. I am using SQL Server Express 2022 version 16.0.1000.6 with all patches installed. I a...
brunosimoes
May 12, 2024Copper Contributor
olafhelper Thank you.
Any effective way to convert the query result into a valid JSON in SQL Serevr?
olafhelper
May 13, 2024Bronze Contributor
brunosimoes SQL Server already returns valid JSON, your way to export it breaks the result.
- olafhelperMay 14, 2024Bronze ContributorEasier way: Right-mouse click in query window => Result to => Result to text, execute query and copy result to an text editor.
- SivertSolemMay 15, 2024Iron Contributor
olafhelper This has the same issue with the newlines.
Using the sample query and sample database:It will still be necessary to concatenate the output to get correctly formatted JSON.