🏆 Loura

ðŸĨ‡ Weblog
ðŸĨˆ Now
ðŸĨ‰ Projects
🍄 🏰 ðŸ‘ŧ 🌞 👑 ðŸ’Ģ 🍌 ðŸŽŪ ðŸĒ

Join rows with JSON data stored in table cells using CROSS APPLY

Published on by

 #wiki 


You need to use cross apply

SELECT sr.Id, sr.OrganizationUnitId, [key] as QuestionTitle, [value] as Answer
FROM [dbo].[PbSSurveyResponses] sr
CROSS APPLY OPENJSON(sr.Response)

Join the conversation!