﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / Performance Tuning  / Escaping special characters Full text index search / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 22:50:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Escaping special characters Full text index search</title><link>http://www.sqlservercentral.com/Forums/Topic444012-65-1.aspx</link><description>Yeah, you are right, thanks :-)</description><pubDate>Wed, 18 Jul 2012 04:52:46 GMT</pubDate><dc:creator>dimitris.staikos</dc:creator></item><item><title>RE: Escaping special characters Full text index search</title><link>http://www.sqlservercentral.com/Forums/Topic444012-65-1.aspx</link><description>[quote][b]dimitris.staikos (7/8/2012)[/b][hr]The '*' is killing you. Use '%' instead.[/quote]Keep in mind that this isn't standard T-SQL.  It's Full Text Search.</description><pubDate>Sun, 08 Jul 2012 12:27:16 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Escaping special characters Full text index search</title><link>http://www.sqlservercentral.com/Forums/Topic444012-65-1.aspx</link><description>The '*' is killing you. Use '%' instead.If you want to search for text that for example contains % or other special characters you have to escape them.See the example below:SELECT * FROM(SELECT UserName + '&amp;%' + Email AS A FROM Employees) GWHERE G.A LIKE '%s&amp;!%x%' ESCAPE '!'I am concatenating two fields adding &amp;% in between. No escaping needed there.And I want to look for any record that has the literal pattern 's&amp;%x' inside itSo in the LIKE however, I start with an '%s (the equivalent of *), follow with an 's', follow with an '&amp;' (no escaping needed) and then I escape the '%' using any character I like, so I chose '!'. Then follows 'x' and '%' for the rest of the string.Pretty straightforward right?CheersDimitris</description><pubDate>Sun, 08 Jul 2012 04:51:36 GMT</pubDate><dc:creator>dimitris.staikos</dc:creator></item><item><title>Escaping special characters Full text index search</title><link>http://www.sqlservercentral.com/Forums/Topic444012-65-1.aspx</link><description>I have created a full text index on a column of a table. The issue is i need to search for AT&amp;T.the query i use for search isSELECT * FROM TABLE_NAME WHERE CONTAINS(COLUMN_NAME, '"AT&amp;T*"')It returns many records but doesn't return the records with AT&amp;T in it. I guess '&amp;' is killing it, but i have no idea how to escape it in case of full text index search.Any help will be deeply appreciated.</description><pubDate>Wed, 16 Jan 2008 14:22:52 GMT</pubDate><dc:creator>jeepee_in</dc:creator></item></channel></rss>