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.......



create or replace procedure show_tab_rec ( P_tab VARCHAR2 ) IS cmd varchar2(50); begin cmd := &#..

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

Post New Answer

More Oracle General Interview Questions

Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

0 Answers  


Briefly explain what is literal? Give an example where it can be used?

0 Answers  


Explain about your project and its relation to the current job position you are applying to?

0 Answers  


What does a Control file Contain ?

2 Answers  


how do get database name at sql prompt?

3 Answers  






which statement is running fastly ie insert or delete?

13 Answers   Oracle,


how to insert data into partitioned table partition done by Range partition

1 Answers  


if you ctreate table identity

0 Answers  


What are the attributes that are found in a cursor?

0 Answers  


How to define a procedure inside another procedure?

0 Answers  


14. Display the item_cost and then round it to the nearest hundred, ten, unit, tenth and hundredth

1 Answers   Wipro,


How to use "out" parameter properly?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)