Hello friends On occasions it is recommended to specify the owner of the object, in this case the stored procedure.
For example: BEGIN sys.dbms_output.put_line ( 'Hello World'); END; On Thu, Jun 18, 2009 at 2:25 PM, ddf <orat...@msn.com> wrote: > > > > On Jun 17, 12:04 pm, Michael Moore <michaeljmo...@gmail.com> wrote: > > begin > > execute immediate 'BEGIN > > dbms_output.put_line(''Argh too''); > > end;'; > > end; > > > > Not for stored procedures? I must not be understanding what you meant > David. > > Mike > > > > > > > > On Tue, Jun 16, 2009 at 1:08 PM, ddf <orat...@msn.com> wrote: > > > > > On Jun 16, 2:04 pm, Vlad <vladimir.mcbad...@gmail.com> wrote: > > > > Can someone show me how you would call a stored procedure (SPB) from > > > > another one (SPA)? > > > > > > SPB can take a variable - a date value. I have been trying with > > > > execute immediate but to no avail. > > > > > > Any pointers would be great. > > > > > Execute immediate is for SQL strings, not stored procedures: > > > > > SQL> create or replace procedure procb(ipar in varchar2) as > > > 2 begin > > > 3 dbms_output.put_line(ipar); > > > 4 end; > > > 5 / > > > > > Procedure created. > > > > > SQL> > > > SQL> create or replace procedure proca (inpar in varchar2) as > > > 2 begin > > > 3 procb(inpar); > > > 4 end; > > > 5 / > > > > > Procedure created. > > > > > SQL> set serveroutput on size 1000000 > > > SQL> exec proca('Yarg') > > > Yarg > > > > > PL/SQL procedure successfully completed. > > > > > SQL> > > > > > David Fitzjarrell- Hide quoted text - > > > > - Show quoted text - > > Because that isn't what he was attempting: > > create or replace proca(inpar in varchar2) > is > begin > execute immediate procb(inpar); > end; > / > > which doesn't work. Your correct use of execute immediate does not > call a stored procedure but an anonymous block of PL/SQL code. Vlad > was attempting to use execute immediate to run a previously created > stored procedure. > > > David Fitzjarrell > > > -- Dorian Jhosua dorian...@gmail.com :P http://dorian599.googlepages.com/ http://cuc.material.googlepages.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---