Question : I have an XML value like this: <R> <I>A</I> <I>B</I> <I>C</I> … </R> I want to concatenate all […]
Tag: xquery
Indexing a view with xQuery in it
Question : I’m not sure if this can be done at all but if it can it would be a […]
How to cast a list of values within xquery in SQL Server?
Question : I have the following T-SQL code that I am trying to get to work: IF EXISTS (SELECT * […]
default value with select case on xml
Question : select case ‘NULL’ when ‘NULL’ then ‘f’ end as out output: f but select case (select (SELECT LEFT(l.list,LEN(l.list)-1) […]
Return xml sequences where an attribute doesn’t contain a specific character
Question : Consider the following simple XML: <xml> <customer name=”Max”> <email address=”me@you.com” /> </customer> <customer name=”Erik”> <email address=”erik@your-mom.com” /> </customer> […]
Query to search for a substring in xml
Question : I use below query to search for a substring in whole xml(including node name and node value) SELECT […]
Improve performance of converting a large xml file (~300 MB) to relational table in SQL Server
Question : So this is what I have so far: –Read xml content into a XML data type variable DECLARE […]
Use xQuery to extract attribute values that also exist in SQL variable
Question : XML structure: <ns0:message xmlns:ns0=’xxx:testing’> <ns0:field name=’AAA’>…</ns0:field> <ns0:field name=’BBB’>…</ns0:field> <ns0:field name=’VVV’>…</ns0:field> <ns0:field name=’CAR’>…</ns0:field> </ns0:message> I have SQL that will […]
Possible to optimize SELECT query involving XQuery functions selecting from elements with arbitrary number of child elements
Question : Suppose I have the following XML data, where <root> can have an arbitrary number of <child> children <child> […]
How to parse XHTML node value with TSQL?
Question : I have the following XHTML and would like to be able to parse out My Node Value. Is […]