Subject Re: [ib-support] Re: SELECT ... WHERE ... LIKE ... question (Firebird 1.02)
Author Lucas Franzen
"wackoj123 " schrieb:
>
> Hi Luc,
>
> > So asking for a LIKE '__AB' will never get you any result
> > back since ALL fields in the char column have a fix
> > length of five and your asking for 4 chars.
> >
> > You may change your column to VARCHAR, make sure you trim
> > the values and it will work.
>
> Then this is a "feature" of LIKE... Because
>
> SELECT Code FROM <Table> WHERE Code = "01AB"
>
> does return this code; in this case SELECT does not have a problem
> with the 4 or 5 characters (I have tested this to make sure this is
> correct :-)).

Ah, I see.
Since I just use CHAR(1) .. CHAR(3) I haven't experienced that before.

So, if you have got that tricky selects, why don't you use five char(1)
columns then? ;-)

it should be much easier to extend the SQL...

Luc.