Re: PL/SQL Question

From: Slava Natapov <Slava_Natapov_at_mail.stil.scitex.com>
Date: 1996/10/21
Message-ID: <326C2633.7D16_at_mail.stil.scitex.com>#1/1


Bor-Ren Jeng wrote:
>
> Hi folks,
>
> I am new in the oracle world. I have a very simple question in the sql.
>
> I have a column is the title of books in a table . Now
> if I want to select all the record has the "food" in the title field(e.g
> Italien Food, Chinese Food or .....). What I try is:
>
> select title from book_table
> where title like '%:input_title%';
>
> The :input_title is a varable which is input from a input box in a form.
>
> What this query returned is the title = 'food' not the title like '%food%'
> Do I miss something here?
>
> Thank you for your help!
>
> -------------------------------------------------
> | <<Bor-Ren Jeng>> |
> | E-mail: borren_at_gwis2.circ.gwu.edu |
> | URL=http://gwis2.circ.gwu.edu/~borren |
> | George Washington University (703)415-1308 |
> -------------------------------------------------

try
select title from book_table
where title like '%'||:input_title||'%';

--Slava Received on Mon Oct 21 1996 - 00:00:00 CEST

Original text of this message