Re: [SQL] Like problem

2008-02-13 Thread Richard Huxton
Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: Campbell, Lance wrote: WARNING: nonstandard use of escape in a string literal LINE 1: ...ct c1 from t1 where c1 like '%abc\_%'; Either indicate you are using an escaped string: LIKE E'%abc\_%' Actually that's wrong, what he'd need

Re: [SQL] Like problem

2008-02-13 Thread Campbell, Lance
Campbell, Lance Sent: Wednesday, February 13, 2008 10:59 AM To: Richard Huxton Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Like problem Richard, The first example you gave me does not work. Below is the test example I used (this example should NOT return 'matched'): SELECT '

Re: [SQL] Like problem

2008-02-13 Thread Campbell, Lance
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 10:53 AM To: Richard Huxton Cc: Campbell, Lance; pgsql-sql@postgresql.org Subject: Re: [SQL] Like problem Richard Huxton <[EMAIL PROTECTED]> writes: > Campbell, Lance wrote: >> WARNIN

Re: [SQL] Like problem

2008-02-13 Thread Campbell, Lance
of Illinois 217.333.0382 http://webservices.uiuc.edu -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 10:42 AM To: Campbell, Lance Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Like problem Campbell, Lance wrote: > 8.2.5 > > I

Re: [SQL] Like problem

2008-02-13 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Campbell, Lance wrote: >> WARNING: nonstandard use of escape in a string literal >> LINE 1: ...ct c1 from t1 where c1 like '%abc\_%'; > Either indicate you are using an escaped string: LIKE E'%abc\_%' Actually that's wrong, what he'd need is LIKE E'%a

Re: [SQL] Like problem

2008-02-13 Thread Richard Huxton
Campbell, Lance wrote: 8.2.5 I am having an issue with trying to use 'LIKE' so that I can match on a string with an underscore in it. What is the proper way to find the following string? WARNING: nonstandard use of escape in a string literal LINE 1: ...ct c1 from t1 where c1 like '%abc\_%'