What are the challenges you face when working across database platforms? Take the survey

Format SQL stumples in xml.query

Format SQL does not like this construction. Seems to be the .query and .value that causes the problem.

CASE WHEN caseTypeRecno IN ( 100010, 100016 )
THEN COALESCE(dbo.xmlCaseSplitTitle(caseDescLong).query('first'),'<first></first>').value('(first/node())[1]','nvarchar(max)')
ELSE caseDescShort
END AS caseTitleFirst,


  • Options
    James RJames R Posts: 104 Silver 4
    Hi @JornSjostrom,

    Unfortunately xml.query is not supported by SQL Prompt at the moment. I'd recommend adding a suggestion to the SQL Prompt uservoice page here and we may revisit it in the future.

    Software Engineer
    Redgate Software
Sign In or Register to comment.