Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL Parameter Problem
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 - 07:36:24 CDT
![]() |
![]() |