dbTalk Databases Forums  

LIKE search statement for a '%@%'

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss LIKE search statement for a '%@%' in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Travis McGee
 
Posts: n/a

Default LIKE search statement for a '%@%' - 06-28-2008 , 08:20 PM






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???



Reply With Quote
  #2  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM






See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #3  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #4  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #5  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #6  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #7  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #8  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #9  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
  #10  
Old   
Michael Coles
 
Posts: n/a

Default Re: LIKE search statement for a '%@%' - 06-29-2008 , 01:44 AM



See response in .datawarehouse.

--

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


"Travis McGee" <travisGatesMcGee (AT) hotmail (DOT) com> wrote

Quote:
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???




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.