Home » SQL & PL/SQL » SQL & PL/SQL » %ROWTYPE question
%ROWTYPE question [message #103] Mon, 14 January 2002 10:56 Go to next message
Eugene
Messages: 44
Registered: August 2001
Member
Hi all,
I have a procedure wich runs a cursor. I'd like to call another procedure and pass the %rowtype of that cursor into it. Is it possible? What is the syntax? Please help.
Eugene
Re: %ROWTYPE question [message #104 is a reply to message #103] Mon, 14 January 2002 14:41 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
declare ref cursor or regular cursor in package header

create package p1 is
type r1 is ref cursor;
end;
or

create package p1 is
cursor c1 is select * from emp;
end;

now, you can pass this cursor type to other procedures.

1)using ref cursor

procedure p2(c p1.r1) is

2) regular cursor

procedure p2(c p1.c1%rowtype) is

...
Previous Topic: pass number and character in dynamic sql
Next Topic: SQLLDR, HOW TO IMPORT MULTI-LINES DATA?
Goto Forum:
  


Current Time: Wed Feb 26 03:29:21 CST 2020