Subject RE: [firebird-support] Is this a bug? (FB 2.1 <...> 2.1.2)
Author Leyne, Sean
Dmitry,

> > Select * from test1 where tipo_doc like '%A';
> >
> > Doesn't work.
> > All field values that end with 'A' have only 2 chars.
> >
> > Can anyone confirm this?
>
> Everything works as it must work. LIKE doesn't ignore trailing
spaces.
>
> SY, SD.

While you are correct, results are valid.

Your reply, though, is a _little_ too brief.


The results are correct because the SQL Standard defines trailing spaces
as not significant for comparison purposes, regardless of the comparison
type (Like or =) or whether the column is defined as a CHAR/VARCHAR.


Sean