Home » SQL & PL/SQL » SQL & PL/SQL » call procedure in function
call procedure in function [message #201380] Fri, 03 November 2006 18:32 Go to next message
hiip
Messages: 78
Registered: October 2006
Member
hi , just want to ask that can we call procedure in the function code??
Re: call procedure in function [message #201382 is a reply to message #201380] Fri, 03 November 2006 18:39 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Sure.

create or replace function my_function(p_parm in number)
  return number
is
begin
  my_procedure;  -- do something
  return (p_parm * 2);
end;
Re: call procedure in function [message #201386 is a reply to message #201382] Fri, 03 November 2006 19:19 Go to previous messageGo to next message
hiip
Messages: 78
Registered: October 2006
Member
wat if i call in the cursor ??
for example
[code]
FUNCTION top_client RETURN client.companyname%Type
IS
CURSOR c1 IS
end_campaign(ctitle IN campaign.title%Type)
Re: call procedure in function [message #201414 is a reply to message #201386] Sat, 04 November 2006 02:23 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
What do you think a cursor actually is?
Please answer this, for it will make it clear if you understand the basic principles of PL/SQL.
icon14.gif  Re: call procedure in function [message #204613 is a reply to message #201380] Tue, 21 November 2006 06:42 Go to previous messageGo to next message
pravin3032
Messages: 51
Registered: November 2006
Location: eARTH
Member
hi,
baby oracle you are trying hard to become Sr. Member.
your count is 78 its gr88888

Cool
Re: call procedure in function [message #204770 is a reply to message #201414] Wed, 22 November 2006 01:15 Go to previous messageGo to next message
moparthy99
Messages: 13
Registered: July 2006
Junior Member
if u want call a stored procedure simply in body of the function
put procedure name along with parameters .
if it is package procedure simply in body of function
put packagename.procedurename along with parameters
Re: call procedure in function [message #204870 is a reply to message #204770] Wed, 22 November 2006 07:44 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Maybe you should try to answer at least one question that someone else hasn't answered already.
Previous Topic: Urgent: Need to find parent child relationships between table
Next Topic: Table index taking huge amount of space
Goto Forum:
  


Current Time: Sun Dec 04 02:31:13 CST 2016

Total time taken to generate the page: 0.10772 seconds