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

Home -> Community -> Usenet -> c.d.o.misc -> Re: cursor parameter and SQL WHERE clause

Re: cursor parameter and SQL WHERE clause

From: Kenneth C Stahl <kcstahl_at_ix.netcom.com>
Date: Sat, 19 Jun 1999 09:27:11 -0400
Message-ID: <376B9AAE.7B88D5CB@ix.netcom.com>


Why are you putting p_in in quotes. It is a pl/sql variable. Just use it without quotes.

Ken

Hans Xie wrote:
>
> Hi all,
>
> I need to use a cursor paramter in SQL WHERE clause for a LIKE condition.
> There must be a way to do it, but I just can not fig out the syntax.
>
> Example code:
>
> CURSOR c1(p_in) IS
> SELECT *
> FROM tab1
> WHERE col1 LIKE 'p_in%';
>
> The problem is at the last line, 'p_in%'. But it doesn't work. What is the
> right syntax to implement this? Or is it impossible to do it?
>
> Thanks in advance.
> Hans Xie
Received on Sat Jun 19 1999 - 08:27:11 CDT

Original text of this message

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