Link to home
Start Free TrialLog in
Avatar of bogiboy
bogiboy

asked on

LIKE Operator in Interbase

I am trying to send SQL command to the Firebird server and cant't get it working. Similar thing on Access works OK;

I want to create parameterized SQL using LIKE operator
"SELECT * FROM Notes WHERE Creator LIKE '%':CreatorParam'%'"

I tried many combinations of single-quotes etc... to but simply nothing is working.
Avatar of kretzschmar
kretzschmar
Flag of Germany image

try

SELECT * FROM Notes WHERE Creator LIKE '%'||:CreatorParam||'%'

your :CreatorParam should be of type string

meikl ;-)
Avatar of miroslavp
miroslavp

Hi,

Or you can just pass '%' into :CreatorParam. Something like this:
"SELECT * FROM Notes WHERE Creator LIKE :CreatorParam"
where :CreatorParam is like '%someone%'.
You get more flexible by this way ;).

TIA,
Miro.
Avatar of bogiboy

ASKER

Thanks guys, I split points for you (half-half).

hvala miro
ASKER CERTIFIED SOLUTION
Avatar of SpideyMod
SpideyMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial