Re: [GENERAL] Escape wildcard problems.

2008-10-24 Thread Thom Brown
Or you could use: SELECT name FROM templates WHERE name ~ '\_cont\_'; This does it as a regular expression. ~* '\_aa\_'; On Fri, Oct 24, 2008 at 5:07 PM, Craig Ringer <[EMAIL PROTECTED]> wrote: > Alan Hodgson wrote: >> On Friday 24 October 2008, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: >>> I

Re: [GENERAL] Escape wildcard problems.

2008-10-24 Thread Craig Ringer
Alan Hodgson wrote: > On Friday 24 October 2008, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: >> I read in the docs (section 9.7.1) that the backslash... \ ... is the >> default escape char to use in "like" expressions. Yet when I try it, it >> doesn't seem to work the ay I expect. Here's an examp

Re: [GENERAL] Escape wildcard problems.

2008-10-24 Thread Alan Hodgson
On Friday 24 October 2008, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: > I read in the docs (section 9.7.1) that the backslash... \ ... is the > default escape char to use in "like" expressions. Yet when I try it, it > doesn't seem to work the ay I expect. Here's an example... > > select name fro

Re: [GENERAL] Escape wildcard problems.

2008-10-24 Thread Sam Mason
On Fri, Oct 24, 2008 at 08:12:38AM -0700, Gauthier, Dave wrote: > select name from templates where name like '%\_cont\_%'; > > name > -- > cgidvcontrol > x8idvcontrol > etc > > I would expect to NOT see these because the "cont" is not preceded by > an

[GENERAL] Escape wildcard problems.

2008-10-24 Thread Gauthier, Dave
I read in the docs (section 9.7.1) that the backslash... \ ... is the default escape char to use in "like" expressions. Yet when I try it, it doesn't seem to work the ay I expect. Here's an example... select name from templates where name like '%\_cont\_%'; name