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 advantages of dateset in datastage?
How to get a create statement for an existing table?
What exactly do quotation marks around the table name do?
What are the execution control statements in oracle?
How to convert characters to numbers in oracle?
Explain what does a control file contain?
How to connect to a remote server?
How to start your 10g xe server from command line?
How to view the tablespaces in the current database?
Is insert autocommit in oracle?
What is clustered table in Oracle?
How do we display rows from the table without duplicates?
What is the disadvantage of User defind function?
What happens if recursive calls get out of control?
What is different types of joins?