<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Database Programming: The String Concatenation XML Trick Revisited (Or, Adam Is Right, But We Can Fix It)</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx</link><description>A find shared by one friend leads to correspondence from another.. The redoubtable Adam Machanic left a comment on The Technique That Lance Found which points out that special XML characters in a string will get entitized. As usual, Adam is correct. If</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Database Programming: The String Concatenation XML Trick Revisited (Or, Adam Is Right, But We Can Fix It)</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3003300</link><pubDate>Sat, 15 Mar 2008 18:06:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3003300</guid><dc:creator>Mladen</dc:creator><description>&lt;p&gt;and don't forget the ampersand (&amp;amp;) character :)&lt;/p&gt;</description></item><item><title>re: Database Programming: The String Concatenation XML Trick Revisited (Or, Adam Is Right, But We Can Fix It)</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3003620</link><pubDate>Sat, 15 Mar 2008 19:38:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3003620</guid><dc:creator>Ward Pond</dc:creator><description>&lt;p&gt;Just another nested REPLACE, Mladen.. &amp;nbsp;we were just proving concept here. :-) &amp;nbsp;If I can get Tony Rogerson's syntax working with this construction, we hopefully won't have to instantiate every entitizable character.&lt;/p&gt;
&lt;p&gt;Stay tuned.. &amp;nbsp;:-)&lt;/p&gt;
</description></item><item><title>Database Programming: The String Concatenation XML Trick, Sans Entitization</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3014647</link><pubDate>Wed, 19 Mar 2008 03:20:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3014647</guid><dc:creator>Ward Pond's SQL Server blog</dc:creator><description>&lt;p&gt;When last we checked in on The Technique That Lance Found , Adam had noted that the method entitizes&lt;/p&gt;
</description></item><item><title>Database Programming: The String Concatenation XML Trick, Finalized</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3017453</link><pubDate>Fri, 21 Mar 2008 17:15:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3017453</guid><dc:creator>Ward Pond's SQL Server blog</dc:creator><description>&lt;p&gt;It's an especially Good Friday when we can close the loop on a technical conversation, and I believe&lt;/p&gt;
</description></item><item><title>May Glad Tidings be Upon You</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3171589</link><pubDate>Sat, 20 Dec 2008 18:55:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3171589</guid><dc:creator>Ward Pond's SQL Server blog</dc:creator><description>&lt;p&gt;UPDATED 20 Dec 2008 to fix links It’s that time of year again, when I disappear from the blogosphere&lt;/p&gt;
</description></item><item><title>re: Database Programming: The String Concatenation XML Trick Revisited (Or, Adam Is Right, But We Can Fix It)</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3205791</link><pubDate>Mon, 23 Feb 2009 20:44:15 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3205791</guid><dc:creator>RBarryYoung</dc:creator><description>&lt;p&gt;The solution that I have been using is:&lt;/p&gt;
&lt;p&gt;--===== &lt;/p&gt;
&lt;p&gt;--Transformed FOR XML String Concatenation:&lt;/p&gt;
&lt;p&gt;select (&lt;/p&gt;
&lt;p&gt;SELECT n + ','&lt;/p&gt;
&lt;p&gt;FROM (&lt;/p&gt;
&lt;p&gt;SELECT 'a&amp;lt;b' AS n&lt;/p&gt;
&lt;p&gt;UNION ALL&lt;/p&gt;
&lt;p&gt;SELECT 'b&amp;gt;a'&lt;/p&gt;
&lt;p&gt;UNION ALL&lt;/p&gt;
&lt;p&gt;SELECT 'b&amp;amp;a'&lt;/p&gt;
&lt;p&gt;UNION ALL&lt;/p&gt;
&lt;p&gt;SELECT 'b&lt;/p&gt;
&lt;p&gt;a') r&lt;/p&gt;
&lt;p&gt;FOR XML PATH(''), TYPE&lt;/p&gt;
&lt;p&gt;).value('.[1]','varchar(max)')&lt;/p&gt;
&lt;p&gt;-- =====&lt;/p&gt;
&lt;p&gt;Which seems to me to be both faster and more complete.&lt;/p&gt;
</description></item><item><title>Database Programming: The String Concatenation XML Trick, Revisited</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3207265</link><pubDate>Fri, 27 Feb 2009 06:31:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3207265</guid><dc:creator>Ward Pond's SQL Server blog</dc:creator><description>&lt;p&gt;I’ve got to pay more punctual attention to my comment pool.. RBarryYoung’s movingsql.com will be on my&lt;/p&gt;
</description></item><item><title>T-SQL Challenge: Grouped String Concatenation</title><link>http://blogs.technet.com/wardpond/archive/2008/03/15/database-programming-the-string-concatenation-xml-trick-revisited-or-adam-is-right-but-we-can-fix-it.aspx#3207486</link><pubDate>Fri, 27 Feb 2009 21:25:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3207486</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;It's been quite a while since the LIKE vs ? Puzzle , and I feel like it's time for another one. Response&lt;/p&gt;
</description></item></channel></rss>