Subject | Re: [firebird-support] Re: Wildcard for Firebird |
---|---|
Author | Leonardo Nakahara de Oliveira |
Post date | 2005-01-21T15:27:39Z |
I wrote this as a test doing it the first way:
select * from MyTable where MyField like 'Something%'
Using
select * from profissao where nome like 'something' || '%' shows me the same error.
Using
select * from profissao where nome starting 'Something' shows me the following error:
Dynamic SQL Error
SQL error code = -206
Column unknown
Something
At line <x>, column <y>.
Very strange.
I'm starting to think that the whole problem is within this .NetProvider.
Svein Erling Tysvær wrote:
select * from MyTable where MyField like 'Something%'
Using
select * from profissao where nome like 'something' || '%' shows me the same error.
Using
select * from profissao where nome starting 'Something' shows me the following error:
Dynamic SQL Error
SQL error code = -206
Column unknown
Something
At line <x>, column <y>.
Very strange.
I'm starting to think that the whole problem is within this .NetProvider.
Svein Erling Tysvær wrote:
>--- 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
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>