Skip to content
Advertisement

How to include OPENJSON in View?

My JSON object is stored in the table (single cell). Right now, I’m reading the cell and saving the value to @json NVARCHAR(MAX)

, but that obviously doesn’t work in views. How can I do something like this?

Advertisement

Answer

You can use cross apply to apply openjson() to each and every row of your table:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement