Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: cursor parameter and SQL WHERE clause
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
![]() |
![]() |