RE: exec immediate

  • From: "Igor Neyman" <ineyman@xxxxxxxxxxxxxx>
  • To: <raja4list@xxxxxxxxx>, "oracle list" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 24 Jan 2006 08:28:08 -0500

Multiple errors in your code.
This will work:
 
set serveroutput on
declare lDate DATE;
begin
execute immediate 'select sysdate  from dual' into lDate;
dbms_output.put_line(lDate);
end ;
/
 
Read Oracle docs.
 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of raja rao
Sent: Tuesday, January 24, 2006 8:22 AM
To: oracle list
Subject: exec immediate


Hi Team,
 
when the below is run i am getting the error. can someone help me :
 
begin
execute immediate ' select sysdate  from dual ;'
end ;
 
 
 
*
ERROR at line 3:
ORA-06550: line 3, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the
following:
. ( * @ % & = - + ; < / > at in is mod not rem return
returning <an exponent (**)> <> or != or ~= >= <= <> and or
like between into using || bulk
The symbol ";" was substituted for "END" to continue.
 

________________________________


What are the most popular cars? Find out at Yahoo! Autos
<http://us.rd.yahoo.com/evt=38382/_ylc=X3oDMTEzNWFva2Y2BF9TAzk3MTA3MDc2B
HNlYwNtYWlsdGFncwRzbGsDMmF1dG9z/*http://autos.yahoo.com/newcars/popular/
thisweek.html>  

Other related posts: