Subject Re: [firebird-support] 'like' with % at the begin finds nothing
Author Dimitry Sibiryakov
On 11 May 2006 at 9:04, Roger CrĐ´mer wrote:

>given a small table
> table t ( v char(10) )
>with only one entry:
> insert into t ( v ) values ( 'abcd' )
>the following select does not find any entry:
> select * from t where v like '%bcd'
>nor does any select with wildcards find anything,
>where the only wildcard is the first char in the
>comparing string.
>Is this correct behaviour or is this a (known?) bug?

This is correct behavior: LIKE is very picky about spaces.

>Is there a simple workaround?

Use Varchar instead of Char.

SY, Dimitry Sibiryakov.