Home » Developer & Programmer » Reports & Discoverer » sql function
sql function [message #394903] Mon, 30 March 2009 14:32 Go to next message
Messages: 5
Registered: March 2009
Location: UAE
Junior Member
i call the function in sql command prompt :
er_msg : OUT parameter

select get_master('bbb','kgs','lbs',122,:er_msg) from tablename;

i got the error 'function has out arguments'

how to get the values in sql?
how to define the variable in sql prompt and return the value

same function i want to call to in the report also
reply me
Re: sql function [message #394908 is a reply to message #394903] Mon, 30 March 2009 16:32 Go to previous messageGo to next message
Messages: 12825
Registered: September 2008
Location: Rainy Manchester
Senior Member
You can't call a function with out parameters in SQL. It only works in PL/SQL.
In sqlplus you'd need to call it from a begin/end block.
In reports you'd need to use a program unit.

It's generally advisable to avoid functions with out parameters for this reason.
Re: sql function [message #395514 is a reply to message #394903] Wed, 01 April 2009 12:55 Go to previous message
Messages: 21148
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If function returns a single value, why would you use OUT parameter anyway? If possible, get rid of it.
Previous Topic: REP-1401: and ORA-06503: Error
Next Topic: Display name of a user who ran the report
Goto Forum:

Current Time: Wed Aug 23 01:10:29 CDT 2017

Total time taken to generate the page: 0.06315 seconds