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
How to rollback the current transaction in oracle?
How to lock and unlock a user account in oracle?
How to delete an existing row from a table in oracle?
What will be the syntax to find current date and time in format "yyyy-mm-dd"?
What is the difference between a user and a schema in oracle?
What is the difference between online and offline backups?
What are the limitations oracle database 10g xe?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
How to write text literals in oracle?
What do you understand by a database object?
How to revoke create session privilege from a user in oracle?
What is blob data type in oracle?
how may join possible between (requisition with purchase order)
How to use like conditions in oracle?
What are the data types in oracle?