Subject | Re: Wildcard for Firebird |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-01-21T14:52:55Z |
--- In firebird-support@yahoogroups.com, Leonardo Nakahara de Oliveira
wrote:
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
wrote:
> Hey Thomas and Scott!Exactly how do you create the statement? Doing
>
> 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>*'"
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