Subject Re: Problem with : where name like '%to'
Author Svein Erling
--- In firebird-support@yahoogroups.com, "fb_cse" wrote:
> Hello,
>
> I've got a problem with a Select.
>
> Select 1 :
> select distinct name from person where name like 'toto';
> Result -> toto
>
> Select 2 :
> select distinct name from person where name like 'to%';
> Result -> toto
>
> Select 3 :
> select distinct name from person where name like '%to';
> Result -> no record
>
> Why Select 3 it's no good ?

Fabienne, try
select distinct '"' || name || '"' from person where name like 'toto';

If that returns
"toto " or something similar, it means that there are trailing spaces
and 'toto ' is not like '%to'.

HTH,
Set