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 -> Passing an arg. to a cursor

Passing an arg. to a cursor

From: Douglas Nichols <dnichols_at_fhcrc.org>
Date: Tue, 30 Nov 1999 21:25:55 +0000
Message-ID: <384440E3.C74F566A@fhcrc.org>


I want to pass the name of a field in a table to a cursor then do a select and other things to that column.

something like:
I have a table MYTABLE with fields (A number, B NUMBER, C NUMBER);

  procedure hello(myvar IN VARCHAR2)
  IS

     CURSOR getme IS (select myvar from MYTABLE);   BEGIN
        do something here...
  END; hello('C');
hello('A');
...

Thanks for your input.
--
Cheers, dn

Douglas Nichols                              dnichols_at_fhcrc.org
---------------------------------------------------------------
National Wilms Tumor Study Group                   206.667.4283
Seattle, WA Received on Tue Nov 30 1999 - 15:25:55 CST

Original text of this message

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