Hi,
|| isn't the concatenation operator by default. If you want it to be set
sql_mode=PIPE_AS_CONCAT. Otherwise, use the CONCAT() function instead of
|| operator.
Peter Boros
On 03/21/2011 11:51 AM, Johan De Taeye wrote:
I ran into this case where a like expression is not evaluated
On Mon, 21 Mar 2011 11:51:27 +0100
Johan De Taeye johan.de.ta...@gmail.com wrote:
insert into lookup (name) values ('AAA');
select * from lookup where name like 'A%';
= 1 record returned. OK
select * from lookup where name like 'A' || '%';
= returns nothing. INCORRECT!
The query is
After updating the SQL_MODE, it works as I expect.
Thanks for your prompt replies!
Johan
-Original Message-
From: petya [mailto:pe...@petya.org.hu]
Sent: Monday, March 21, 2011 12:10 PM
To: Johan De Taeye
Cc: mysql@lists.mysql.com
Subject: Re: Problem filtering with a like