Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Executing Dynamic SQL
execute somepackage.someproc is valid sql*plus input; however, it is
not valid SQL nor PL/SQL.
"execute" is sql*plus syntactic sugar for:
begin
somepackage.someproc;
end;
Cheers,
Fred
miaemp_at_my-deja.com wrote:
> I am trying to execute a stored package using dynamic sql. Can this be
> done? I am getting an ora-900 error, invalid sql statement. The sql
> statement I am parsing is 'execute dbms_space_x.unused_space(parameter
> list)'. dbms_space_x is a public synonym pointing to a remote
> database's dbms_space where x is the database name. All of the
> parameters are bound. Is my statement correct? Normally I would have
> mad a call to dbms_space package in an anonymous pl/sql block, but,
> this has to be dynamic as there are mulitple databases being tracked.
> Any thoughts?
>
> TIA
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
+-------------------------------------+----------------------------+ | Fred Petillot | fpetillo_at_fr.oracle.com | | Oracle France - Support Technique | +33 1 4762 8201 | | 65, rue des Trois Fontanot | +33 6 8089 5135 | | 92732 Nanterre Cedex | | +-------------------------------------+----------------------------+Received on Thu Dec 30 1999 - 12:09:42 CST