Re: escaped underscore

Gonzalo "D?az" <[email protected]> Thu, 14 Sep 2006 07:27:58 -0700 (PDT)
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
No, the underscore in an SQL LIKE statement means 'any
single character', so appending it to a percent sign
doesn't make sense. I need to check for actual
underscore characters.

   Gonzalo

--- Mark Salter <[email protected]> wrote:

> Gonzalo Díaz wrote:
> > I tried the backslash but it doesn't seem to work.
> I
> > also tried a varied number of backslashes (2, 4,
> etc),
> > to allow for Java backslash escaping, regular
> > expressions, etc., to no avail.
> 
> Did you try leaving the escape off :-
> 
>     SELECT * FROM EMAILS_TABLE WHERE EMAIL LIKE
> '%_%'
> 
> Only a suggestion, I have not tried it, nor am I an
> expert.
> 
> Or do you have to escape it?
> 
> -- 
> Mark
> 
> 
>
---------------------------------------------------------------
> Mckoi SQL Database mailing list 
> http://www.mckoi.com/database/
> To unsubscribe, send a message to
> [email protected]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]