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 truncate oracle?
what is the syntax of CREATE command?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
Does oracle partitioning improve performance?
What is the difference between Sleep and Wait? (Java)
What is index-organized table in Oracle?
19. Display all clients whose name begins with the letter J or contains the letter M anywhere or contains E as the third letter.
What is Database Trigger ?
What is SYSTEM tablespace and When is it Created?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).