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 -> cursor parameter and SQL WHERE clause

cursor parameter and SQL WHERE clause

From: Hans Xie <hans.xie_at_its.CSIRO.AU>
Date: Thu, 17 Jun 99 00:24:21 GMT
Message-ID: <7k9f7l$k0_001@its.csiro.au>


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 Wed Jun 16 1999 - 19:24:21 CDT

Original text of this message

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