... AS XML).query('data(/STAFF/GENDER)') AS VARCHAR(10)) AS Gender
FROM
[dbo].[XML_EVENTS]
-- Returns column GENDER for every record/row (eg. "Male")
Or
-- Using .value()
SELECT
CAST(Event_XML ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.