I'd like to find an empty organisation element where it is not the immediate child of a parentProblem element.
Like so..
select * from Audit.PatientAudit pa
where pa.BeforeXml.exist('//*:organisation[not(../*:parentProblem)]') = 1
But it doesn't seem to work, any ideas?