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
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 '
-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
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
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
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\_%'
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?
Table t1
Column c1
String I want to match on 'abc_'
SELECT c1 FROM t1 WHERE c1 LIKE '%abc\_%';
This gives me the follow
Her Goo wrote:
> I am using "postgresql-7.3.2-1" now!
>
> I met a problem when using "LIKE" in "WHERE" clause.
> For example, a table named "t_test", and its data looks like below:
>
> # SELECT * FROM t_test;
> id | c_name
> +
> 1 | abc\
> 2 | abc\de
> (2 rows)
> # SELECT * FRO
"Her Goo" <[EMAIL PROTECTED]> writes:
> I want to go a step further, and restrict the results to those
> that begin with string "abc\d".
You need four backslashes for that, because \ is special to both
the string literal parser and the LIKE operator. So ''
reduces to a string constant conta
I am using "postgresql-7.3.2-1" now!
I met a problem when using "LIKE" in "WHERE" clause.
For example, a table named "t_test", and its data looks like below:
# SELECT * FROM t_test;
id | c_name
+
1 | abc\
2 | abc\de
(2 rows)
The thing I want to do is searching in above table an
10 matches
Mail list logo