Executing subprocedure [message #404715] |
Sat, 23 May 2009 00:46  |
ramesh55.sse
Messages: 262 Registered: December 2008 Location: Hyderabad
|
Senior Member |
|
|
How can we execute subprocedure.Please help me
create or replace procedure mainproc
is
v_empno number;
procedure subproc
is
begin
insert into emp8 values(100,'ramesh');
end;
begin
select empno into v_empno from emp where ename='SMITH';
dbms_output.put_line(v_empno);
end;
/
exec mainproc
But how can we execute subproc
|
|
|
|
|
|
Re: Executing subprocedure [message #404854 is a reply to message #404741] |
Mon, 25 May 2009 00:56   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
vigneshbemba wrote on Sat, 23 May 2009 09:11 | Also,instead of embedding the subproc inside the main procedure try to create the subproc seperately and call the subproc inside the main procedure.
|
Why? If he wants to embed this function, there might be a good reason for it.
Now, if you would have advised him to put both inside a package and make the embedded function private and the other public, then I would agree.
|
|
|
|
|
|
|
Re: Executing subprocedure [message #404907 is a reply to message #404900] |
Mon, 25 May 2009 07:08  |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | I thought that the OP hasn't answered/responded for a while
|
He NEVER answers to any of his numerous questions. It was just to warn you and prevent from wasting your time.
Regards
Michel
|
|
|