Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1380
  • Last Modified:

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.
0
bogiboy
Asked:
bogiboy
1 Solution
 
kretzschmarCommented:
try

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

your :CreatorParam should be of type string

meikl ;-)
0
 
miroslavpCommented:
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.
0
 
bogiboyAuthor Commented:
Thanks guys, I split points for you (half-half).

hvala miro
0
 
SpideyModCommented:
PAQ'd and points refunded.  

In the future, request a split in CS first so we can select one of the expert's answers and you need only create a single points for question.  Also, now I must make this a zero-point question which gives the question away for free to future PAQ purchasers instead of the 25 point value (which turns into a 2 point value question when it's done).
Finally, once you do create the "points for expertname" question. Copy the link for that question and paste it back into the original question.  Thanks.


miroslavp your points for this question are at:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20528278.html

kretzschmar your points for this question are at:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20528276.html
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now