Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: question about a search

Re: question about a search

From: John Russell <netnews9_at_johnrussell.mailshell.com>
Date: Sat, 01 May 2004 18:24:22 GMT
Message-ID: <orq7905e53t4tnehrejo8dtgk4obos045r@4ax.com>


>Matt wrote:
>
>> I'm creating PSP pages.
>>
>> I have a page where a user can enter a search term, and two radio buttons to
>> select whether they would like to search the name field, or the description
>> field.
>>
>> So, I created a cursor like this:
>>
>> <%!cursor game_cursor is
>> select *
>> from video_game
>> where search_area LIKE '%&search_terms%';%>

You have to concatenate the variable into a longer string, otherwise you are just searching for something that actually contains the string 'search terms':

where search_area LIKE '%' || search_terms || '%';%>

& is meaningless in this context. Maybe you're thinking of the substitution character in SQL*Plus?

John

--
Photo gallery: http://www.pbase.com/john_russell/
Received on Sat May 01 2004 - 13:24:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US