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.
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.
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.
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.
ASKER
Thanks guys, I split points for you (half-half).
hvala miro
hvala miro
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT * FROM Notes WHERE Creator LIKE '%'||:CreatorParam||'%'
your :CreatorParam should be of type string
meikl ;-)