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: PL/SQL Parameter Problem

Re: PL/SQL Parameter Problem

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 12 Aug 2002 14:24:32 +0100
Message-ID: <3d57b711$0$227$ed9e5944@reading.news.pipex.net>


ref cursor is the type you are looking for.

http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/appdev.817/ a77069/05_ora.htm#1576

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
"Frank Zaum" <frankzaum_at_yahoo.de> wrote in message
news:4c1e5bbe.0208120436.92a43e6_at_posting.google.com...

> Dear Experts, (8.1.7.3 on Linux Intel)
>
> I read in Bill Pribyls PLSQL book that a function/procedure can accept
> a complete record from a cursor as a parameter.
> This sounds very comfortable, but the examples do not explain of what
> type the parameter should be declared, and i can't figure it out.
>
> i want to do something like this (these functions/procedures are in
> the same package) :
>
> for v_cur in (select a.emp_no, b.deptno, max(a.salary) maxi from emp a
> ,dept b)
> loop
> update_this_stuff(v_cur);
>
> do_something_else(v_cur);
>
> insert_log(v_cur);
>
> delete_everything(v_cur);
>
> end loop;
>
> procedure update_this_stuff(v_cur in out ???? ) is --which type
> is right?
> begin
>
> v_cur.maxi = v_cur.maxi +1000;
>
>
> end;
>
> I know that its not %type , but %rowtype does not seem to fit, too
> because it references just a single element of a record (v_cur).
>
> Any help would be appreciated.
>
> Thanks in advance,
>
> Frank Zaum, Salzgitter
Received on Mon Aug 12 2002 - 08:24:32 CDT

Original text of this message

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