Subject Re: Wildcard for Firebird
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, Leonardo Nakahara de Oliveira
wrote:
> Hey Thomas and Scott!
>
> I missed the *, but in fact, in the program, i put:
> "select * from <table> where <field> like '<something>%'".
> The missing * is not the problem at all. The error i gave is
> the problem.
>
> And I tried with the * as a wildcard.
>
> So, the query would be: "select * from <table> where <field> like
> '<something>*'"

Exactly how do you create the statement? Doing

select * from MyTable where MyField like 'Something%'

or

select * from MyTable where MyField like :Parameter

where parameter contains '%' should work, whereas

select * from MyTable where MyField like :Parameter || '%'

may not work.

Anyway, if you always know the beginning of the string, use

select * from MyTable where MyField starting :Parameter

without any '%'.

HTH,
Set