FarazMSyed
asked on
cursor_type emp%rowtype
here is my problem ....
i need to create a procedure e.g
Create or replace procedure abc
(cur_type emp%rowtype);
...... and so on
if i need to call this procedure in a pl/sql block e.g.
declare
cur c1 is select * from emp;
begin
for rec in c1 loop
abc(cursor_type);
blah blah ...
my point is i need to dynamic this cursor_type ... whatever table I select in c1 i wouldn't change that abc procedure with cursor_type emp%rowtype to
dept%rowtype (if i am selecting from dept table in c1 cursor)... there must be something dynamic in it ... i hope i clear my point ...if anyone have any idea to solve it ....
tx
i need to create a procedure e.g
Create or replace procedure abc
(cur_type emp%rowtype);
...... and so on
if i need to call this procedure in a pl/sql block e.g.
declare
cur c1 is select * from emp;
begin
for rec in c1 loop
abc(cursor_type);
blah blah ...
my point is i need to dynamic this cursor_type ... whatever table I select in c1 i wouldn't change that abc procedure with cursor_type emp%rowtype to
dept%rowtype (if i am selecting from dept table in c1 cursor)... there must be something dynamic in it ... i hope i clear my point ...if anyone have any idea to solve it ....
tx
Use DBMS_SQL package
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
u cannot use %rowtype in procedures straight away in declaration statements. but u can define a cursor inside the body and then return the result in a variable which can be dynamically called in sql.
ASKER
Guys!!!
thanx for your help i think Grinberg has given me the solution ...
thanx again
Faraz
thanx for your help i think Grinberg has given me the solution ...
thanx again
Faraz