I have a simple script that is returning data from an XML column.
SELECT
CONVERT(XML,[DATA]).value('(/FormSection/FormSection/Form/Breathing/SmokingStatus/node())[1]', 'nvarchar(max)') [SMOKING STATUS]
FROM MYTABLE
Which works completely fine when a value has been recorded textually like below and the value non-smoker is returned to the grid:
<SmokingStatus points="null" code="nonSmoker">non smoker</SmokingStatus>
However when I find values like false or true like in the xml below, its returning NULL
<RequestCessationYes value="false" />
Could anyone point out what I am missing please?