LIKE Operator in Interbase

Posted on 2003-02-24
Medium Priority
Last Modified: 2008-03-03
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.
Question by:bogiboy
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 27

Expert Comment

ID: 8014625

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

your :CreatorParam should be of type string

meikl ;-)

Expert Comment

ID: 8014725

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 ;).


Author Comment

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

hvala miro

Accepted Solution

SpideyMod earned 0 total points
ID: 8017542
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:

kretzschmar your points for this question are at:

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question