Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Sat, 28 Jun 2008 21:20:55 -0400,    group: microsoft.public.sqlserver.clients        back       


LIKE search statement for a '%@%'   
Does anybody know why searching for a string '@' with LIKE does not work 
even when you use ESCAPE

Very strange......

Say the field has .....   I love my @*&!& friend
And I want to SELECT this row when I search for @ with LIKE
Select * from myTable where myField like '%@%'     does not work
Select * from myTable where myField like '%#@%'  escape '#'     does not 
work either
Select * from myTable where myField like '%' + char(64) + '%'     does not 
work either

What a pain in the something search + Why me

Any help???
date: Sat, 28 Jun 2008 21:20:55 -0400   author:   Travis McGee

Re: LIKE search statement for a '%@%'   
See response in .datawarehouse.

-- 

========
Michael Coles
"Pro SQL Server 2008 XML"
http://www.amazon.com/Pro-SQL-Server-2008-XML/dp/1590599837/


"Travis McGee"  wrote in message 
news:OtJ$wZY2IHA.4920@TK2MSFTNGP05.phx.gbl...
> Does anybody know why searching for a string '@' with LIKE does not work 
> even when you use ESCAPE
>
> Very strange......
>
> Say the field has .....   I love my @*&!& friend
> And I want to SELECT this row when I search for @ with LIKE
> Select * from myTable where myField like '%@%'     does not work
> Select * from myTable where myField like '%#@%'  escape '#'     does not 
> work either
> Select * from myTable where myField like '%' + char(64) + '%'     does not 
> work either
>
> What a pain in the something search + Why me
>
> Any help???
>
date: Sun, 29 Jun 2008 02:44:57 -0400   author:   Michael Coles michaelcoREPLACE_THIS_WITH_AT_SIGNoptonline.net

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us