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
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
Explain the use of inctype option in exp command.
Explain enable novalidate constraint.
What is integrity and what is constraint??Explain with example
What are the oracle built-in data types?
Calculate difference between 2 date / times in oracle sql?
Explain an exception and its types?
How can we force the database to use the user specified rollback segment?
How do you tell what your machine name is and what is its IP address?
What are advantages of dateset in datastage?
How to define a specific record type?
What is a nested table and how is it different from a normal table?
What is a proxy object?
How to connect to a remote server?
How many types of auditing in Oracle?