Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What are set operators?

1029


What is open database communication (odbc) in oracle?

948


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

2300


Explain what does a control file contain?

1032


How to use "in" parameter properly?

1001


What are the parameters that we can pass through a stored procedure?

997


How to drop a stored function?

1083


When do I need to use a semicolon vs a slash in oracle sql?

1026


How do I start tns listener?

987


What is the usage of merge statement?

1095


How to use regular expression in pattern match conditions in oracle?

975


How to bring a tablespace online?

993


How to write a query with an inner join in oracle?

973


What is concurrency in oracle?

946


Is oracle an operator?

883