Subject Re: [firebird-support] Wildcard for Firebird
Author Leonardo Nakahara de Oliveira
Ok Fellows,

Let me try to be the more specific I can.

------------------------------------------------
select * from COUNTRY where NAME like '<something>%' or
select * from COUNTRY where NAME like '<something>' || '%'

Both ways show me the following error:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 45
%

The field NAME is a varchar(50) field.
------------------------------------------------
select * from COUNTRY where IDCOUNTRY = 10
or select * from COUNTRY where IDCOUNTRY = '10'
or even select * from COUNTRY where IDCOUNTRY = '1%'

works fine.

And the field IDCOUNTRY is as integer field.

That's what makes me more confused, because in an integer field the
query works greatly but when the field is a varchar onde, it doesn't.

Leonardo Nakahara de Oliveira