<rss version="2.0"><channel><title>RSS feed for InstantSpot site Dave Shuck&apos;s InstantSpot</title><link>http://daveshuck.instantspot.com</link><language>en-us</language><copyright>This work is Copyright &#xA9; 2008 by Dave Shuck&apos;s InstantSpot</copyright><generator>RSSVille ColdFusion FeedMaker, version 1.0</generator><pubDate>Sun, 07 Sep 2008 22:29:01 GMT</pubDate><item><title>Using escape characters with MS SQL Server</title><link>http://daveshuck.instantspot.com/blog/2006/11/03/Using-escape-characters-with-MS-SQL-Server</link><description>&lt;p&gt;
This morning I was asked to do a quick and dirty query to find all rows from a table in MS SQL Server where a particular column contained one or more pecent sign (%) charaters.&amp;nbsp; Considering the &amp;#39;%&amp;#39; character is a wildcard, I obviously needed an escape sequence, but oddly I had never run across this particular problem before.&amp;nbsp; After a quick search I found what appears to be a Microsoft-specific solution that suited my needs.&amp;nbsp; You can use an escape character in your &amp;#39;where&amp;#39; clause, then define that character at the end of your query by adding {escape &amp;#39;[your character]&amp;#39;} like this:
&lt;/p&gt;
&lt;p&gt;
SELECT &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyColumn &lt;br /&gt;
FROM &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyTable&lt;br /&gt;
WHERE &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyColumn like &amp;#39;%\%%&amp;#39; &lt;br /&gt;
{escape &amp;#39;\&amp;#39;}&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
I would like to underscore that the backslash character in my statement can be whatever you need it to be in case that is another point of conflict for you.&lt;br /&gt;
&lt;/p&gt;
</description><pubDate>Fri, 03 Nov 2006 16:08:08 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2006/11/03/Using-escape-characters-with-MS-SQL-Server</guid><category>SQL</category></item><item><title>We have landed</title><link>http://daveshuck.instantspot.com/blog/2005/07/10/We-have-landed</link><description>&lt;font size=&quot;2&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot;&gt;Well, I have installed my blogging software.&amp;nbsp; Time to play. :)&lt;br/&gt;
&lt;/font&gt;</description><pubDate>Sun, 10 Jul 2005 05:00:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2005/07/10/We-have-landed</guid><category>ColdFusion</category></item></channel></rss>