Subject Re: LIKE problem
Author a987oau7923898723
> Did a quick test in the example database:
>
> insert into country values ('test%', 'oink');
> select * from country where 'testum' like country;
>
> Output:
>
> COUNTRY CURRENCY
> =============== ==========
>
> test% oink
>

Hmm, that works for me too.

OK, figured out what the problem was: I used CHAR(n) in the column
definition, which is wrong because then there are extra spaces
appened to the comparison value and so it doesn't match (unless the
value being tested also happens to have that many spaces at the end).

The reason I didn't notice my mistake when I tried it on mysql was
that mysql can (and does) silently change CHAR(n) to VARCHAR(n)...

Thanks for your help :)