Home » SQL & PL/SQL » SQL & PL/SQL » error returned calling a function
error returned calling a function [message #22172] Thu, 26 September 2002 16:06 Go to next message
kimberly
Messages: 6
Registered: December 2001
Junior Member
I created this function

create or replace function iwu1dbo.hypo10 (fund in number)
RETURN VARCHAR2
IS
fund_c varchar2(4);
BEGIN
SELECT FUND_C
INTO fund_c
from t_iwfi_fund_info
WHERE FUND_ID = fund;
return(fund_c);
end
/

and oracle returned the message saying it was created successfully but when I go to call it

execute iwu1dbo.hypo (4532);

it tells me

'HYPO10' is not a procedure or is undefined
Re: error returned calling a function [message #22173 is a reply to message #22172] Thu, 26 September 2002 16:42 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
You created a function but you are trying to execute it as a procedure. Either:

select iwu1dbo.hypo10(4532) from dual;


or

sql>var x number
sql>exec :x := iwu1dbo.hypo10(4532)
sql>print x
Re: error returned calling a function [message #22180 is a reply to message #22173] Fri, 27 September 2002 05:33 Go to previous message
kimberly
Messages: 6
Registered: December 2001
Junior Member
Thank you!
Previous Topic: How can a DBA influence all sessions currently logged in to an instance? Broadcast?
Next Topic: Submit a Table Name as a Parameter to a Procedure for Processing?
Goto Forum:
  


Current Time: Sun Apr 28 14:05:46 CDT 2024