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 / 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 |
What is an oracle transaction?
How to establish administrator authentication to the server?
What is query image?
Give the sequence in which triggers fired during insert operations, when the following 3 triggers are defined at the same block level ?
How to execute a stored program unit?
What are the uses of linked server and explain it in detail?
what is the difference between simple view and complex view?
I have one table :EID,Depid,ename,sal I want to have max(sal) in each department.
5 Answers Microsoft, Oracle, TCS,
What different of iner joint & outer joint with example
16. Display the order number, order line number and the shipping date. If the shipping date is null, display the string <not shipped yet>.
Why does oracle 9i treat an empty string as null?
What is a partition in oracle?