New answers tagged xml
9
votes
Accepted
XML Query keeps converting < to < and > to >
You are doing one level of select too many in the problematic part of your code.
Your version simplified
select (
select '<>' as [processing-instruction(query_plan)]
)
for xml path(...
1
vote
Is there a simple way to filter XML datatype in SQL-Server?
Phil W. is right. The proper way would be doing what he suggests.
For a quick hack, you might try converting the XML to string and then using LIKE. However, I wouldn't expect performance to be ...
1
vote
Is there a simple way to filter XML datatype in SQL-Server?
Is there a simple way (without needing to know all about XPath) to write a WHERE-clause on such column?
Short answer? No.
You must use the Right Tool for the Right Job.
XML != text
XML != free text ...
Top 50 recent answers are included
Related Tags
xml × 378sql-server × 224
sql-server-2012 × 45
oracle × 34
t-sql × 34
xquery × 31
sql-server-2008 × 29
performance × 24
postgresql × 22
sql-server-2008-r2 × 22
execution-plan × 18
mysql × 17
sql-server-2014 × 15
sql-server-2016 × 14
oracle-11g-r2 × 14
import × 13
sql-server-2005 × 12
database-design × 9
stored-procedures × 8
sql-clr × 8
index × 7
ssis × 7
xsd × 7
query-performance × 6
functions × 6