Top "Xquery" questions

XQuery is a functional language designed to query and manipulate XML data.

Merge the two xml fragments into one?

How to merge the xml content of @a and @b into @c? declare @a xml = (select 1 aaa for xml path(…

sql-server xml sql-server-2008 xquery
How to count each instance of distinct-values in XQuery?

I have an XML file with the following elements and attributes: <element> <unit id="1" color="blue"/> &…

xml count xquery distinct-values
XQuery vs XSLT for transforming data

What do you use in your applications for transforming XML data to other data types? WHY?

xml xquery xslt
how to replace the value of an attribute using xquery

I have an xml document as follows <users> <user test="oldvalue"> <userid>sony</…

xquery xquery-update
XQuery: removing newline/return character from end of a string stored in a variable in query

How do I remove a new-line/return from the end of a variable? I tried functx:substring-before-last to try and …

xquery flwor functx
How to get sum of nodes values in XQuery?

In below xml, there are two types of information related to parts and orders. XML: <mo> <parts&…

xml xquery scrape
XQuery exist method

How do I check against multiple values in XQuery exist method? I'm running this XQuery in a SQL statement Select […

sql sql-server xquery xpath-2.0 exist-db
SQL Server XML Column exist() query

Assuming I have a SQL Server 2005 table with an xml column containing the following values: CREATE TABLE XmlTest ( XMLid int, …

xml tsql xquery
xQuery LIKE-operator?

Is there any way to perform a LIKE operation with XQuery in the same way as with SQL? I wan't …

sql xml xpath xquery
Remove duplicates from return XQuery

My XQuery is: declare namespace xsd="http://www.w3.org/2001/XMLSchema"; for $schema in xsd:schema for $nodes in $schema//*, $…

xml xquery basex xquery-3.0