To Call Procedure from another procedure [message #284949] |
Mon, 03 December 2007 00:06  |
spkj
Messages: 5 Registered: December 2007
|
Junior Member |
|
|
hi,
I am facing a problem in calling a one procedure's paramter in another procedure.
problem specification
---------------------
I want to call one procedure's out paramter in another procedure.
Below is the layout of how i am calling the out parameter of procedure A in Procedure B.
but this is giving an error 'invalid identifier'.
Procedure A
( element_id Out
)
Procedure B
(
value1 in
vlaue2 out
)
IS
l_element_id tablename%type;
BEGIN
select value2
into l_val2
where
l_element_id = ProcedureA(element_id)
please suggest me any work arounds on this ASAP.
thanks,
spkj
|
|
|
|
Re: To Call Procedure from another procedure [message #284955 is a reply to message #284949] |
Mon, 03 December 2007 00:18   |
spkj
Messages: 5 Registered: December 2007
|
Junior Member |
|
|
hi,
thanks for the reply.
both procedure A and Procedure B are inside a package.
Procedure A is called at several places in the package already.
i think again writing a function to achieve the same task will be overhead.
query is
Select value2
into l_val2
from tablename
where
l_val1 = tablename.column_name
and
l_element_id = ProcedureA(element_id)
thanks,
seetha
|
|
|
|
|
|
|
|
|
Re: To Call Procedure from another procedure [message #284985 is a reply to message #284981] |
Mon, 03 December 2007 01:25   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
The original poster should create a function that can act as a wrapper around his procedure. The function will return the out-parameter from the procedure. No messing around with global package variables etc; this is pure about re-using existing code.
[Edit: (only saw Michel's reply after posting) And this is my interpretation of the problem ]
[Updated on: Mon, 03 December 2007 01:26] Report message to a moderator
|
|
|
|
|
|