hi guys,
Still trying to get my head around Xquery
I have the following logic
SET @CRM = (
SELECT TOP 1 CRM FROM
(
SELECT
cast(xmltext.query('/PARAMS/FILTERS/CRM')as nvarchar(max)) as 'CRM'
FROM
#XML
) X
)
Which returns me the following result
<CRM>ONLY<TYPE>FSACLOSED</TYPE><TYPE>NRCLOSED</TYPE></CRM>
I would like to get hold of just the 'ONLY' part of this string, i.e. only the value under the root of the node, not the child nodes or their values.
Can I do this with XQuery or do I need to use string manipulation to isolate it?