Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Returning values from Procs/Functions

RE: Returning values from Procs/Functions

From: Jamadagni, Rajendra <rajendra.jamadagni_at_espn.com>
Date: Wed, 6 Sep 2000 15:13:31 -0400
Message-Id: <10611.116333@fatcity.com>


Glenn,

You need to look at examples with OUT or IN OUT parameters for procedures. That's how you return parameters back. By definition function should return only one value, but Oracle allows you to have OUT parameters permitting more than one values to be returned. Als0 one can use RECORDS or PL/SQL Tables to return multiple values.

Example ....

   PROCEDURE summary_totals(p_off_str  IN VARCHAR2,
                            p_net_str  IN VARCHAR2,
                            p_advr_str IN VARCHAR2,
                            p_agnc_str IN VARCHAR2,
                            p_cal      IN VARCHAR2,
                            p_office   IN VARCHAR2,
                            p_year     IN NUMBER,
                            p_log      IN NUMBER   DEFAULT NULL,
                            p_ae       IN NUMBER   DEFAULT NULL,
                            p_group    IN VARCHAR2 DEFAULT NULL,
                            -- values returned in following parameters to
calling proc
                            Goal_q1   OUT NUMBER,
                            Goal_q2   OUT NUMBER,
                            Goal_q3   OUT NUMBER,
                            Goal_q4   OUT NUMBER,
                            OHP_q1    OUT NUMBER,
                            OHP_q2    OUT NUMBER,
                            OHP_q3    OUT NUMBER,
                            OHP_q4    OUT NUMBER);

HTH
Raj



Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
QOTD: Any clod can have facts, but having an opinion is an art ! Any opinion expressed here is personal and doesn't reflect that of ESPN Inc. Received on Wed Sep 06 2000 - 14:13:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US