Here's my follow-up question regarding industry practice to tackle this problem:

T-SQL LIKE Predicate failed to match with whitespace in XML converted varchar

I'm interested to know any better alternative to write following query to determine the existence of child nodes for a particular XML node:-

with xmlnamespaces(
  'http://schemas.xmlsoap.org/soap/envelope/' as [env],
  'http://abc.com' as [ns],
  'http://abc.com/xsd' as [xsd]
select *
  from @container
 where Response.exist('/env:Envelope/env:Body/ns:MessageResponse/ns:return/xsd:ResponseList/text()') = 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.