create or replace procedure show_tab_rec ( P_tab VARCHAR2 )
IS
cmd varchar2(50);
begin
cmd := 'select *
from '|| P_tab;
for int in ( execute immediate cmd )
loop
dbms_output.put_line ( int.ename||' '||int.deptno);
end loop;
end;
when i m compling this procedure i m getting this error
PLS-00103: Encountered the symbol "IMMEDIATE" when expecting
one
of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
PLZ solve this error
give this question answer asap
Thanks advance.......
Answer Posted / satish
we can't use execute immediate in for loop cursor.So,we can
use ref cursor instead of this to achieve this solution
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are set operators?
What is open database communication (odbc) in oracle?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
Explain what does a control file contain?
How to use "in" parameter properly?
What are the parameters that we can pass through a stored procedure?
How to drop a stored function?
When do I need to use a semicolon vs a slash in oracle sql?
How do I start tns listener?
What is the usage of merge statement?
How to use regular expression in pattern match conditions in oracle?
How to bring a tablespace online?
How to write a query with an inner join in oracle?
What is concurrency in oracle?
Is oracle an operator?