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


Please Help Members By Posting Answers For Below Questions

How to rollback the current transaction in oracle?

795


How to lock and unlock a user account in oracle?

861


How to delete an existing row from a table in oracle?

862


What will be the syntax to find current date and time in format "yyyy-mm-dd"?

814


What is the difference between a user and a schema in oracle?

831


What is the difference between online and offline backups?

768


What are the limitations oracle database 10g xe?

796


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?

1730


How to write text literals in oracle?

863


What do you understand by a database object?

814


How to revoke create session privilege from a user in oracle?

778


What is blob data type in oracle?

839


how may join possible between (requisition with purchase order)

1971


How to use like conditions in oracle?

807


What are the data types in oracle?

795