Re: PL/SQL Question
From: Alik Shapiro <fz1dmj_at_agt.gmeds.com>
Date: 1996/10/10
Message-ID: <325D45CF.5FF5_at_agt.gmeds.com>#1/1
Date: 1996/10/10
Message-ID: <325D45CF.5FF5_at_agt.gmeds.com>#1/1
Bor-Ren Jeng wrote:
> 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?
>
>
Try
select title from book_table
where lower(title) like lower( '%' || :input_title || '%' ) ;
Hope it helps
-- Alik Shapiro Oracle DBA, EDS The above statements and opinions are my own and do not necessarily represent those of EDS.Received on Thu Oct 10 1996 - 00:00:00 CEST