Subject | Re: [ib-support] LIKE problem |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-04-09T02:01:13Z |
Hello,
test%
into the field.
Then, you use LIKE without wildcards, so it works as =
Since 'test%' != 'test@...', no match is found here.
(You might try
...WHERE 'test@...' LIKE addr
but I don't know if that's supported syntax. If it is, it should
return a match.)
Greetings,
Paul Vinkenoog
Not like that -- like that!
(Tommy Cooper)
> (...) but if I do:This is exactly what I would expect: you've inserted the string
> CREATE TABLE foo (addr CHAR(64));
> INSERT INTO foo (addr) VALUES('test%');
> SELECT * FROM foo WHERE addr LIKE 'test@...';
> the select returns no results (the query doesn't fail, it just
> doesn't match any rows).
test%
into the field.
Then, you use LIKE without wildcards, so it works as =
Since 'test%' != 'test@...', no match is found here.
(You might try
...WHERE 'test@...' LIKE addr
but I don't know if that's supported syntax. If it is, it should
return a match.)
> I'm pretty sure it's a bug, and I tried it on mysql and it worksWell, then I'm pretty sure it's a bug in mysql ;-)
> fine there.
Greetings,
Paul Vinkenoog
Not like that -- like that!
(Tommy Cooper)