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

Home -> Community -> Usenet -> c.d.o.server -> Returning multiple params from function

Returning multiple params from function

From: <outtany_at_yahoo.com>
Date: Fri, 19 Feb 1999 18:20:03 GMT
Message-ID: <7aka07$1f6$1@nnrp1.dejanews.com>


Hi there,

I'm very new to PL/SQL and would like to do something I've often done in SQLServer/Transact SQL. I want a function to return two values. I'm unsure about how to accomplish this.

Do I use the IN OUT, DEFAULT NULL, then assign the value in the function & return it?

EX:

RETURN

	 TableFOO.InquiryID%TYPE;
	 TableBAR.InquiryId%TYPE;
As
	V_InquiryID TableFOO.InquiryID%TYPE AND
	V_BARInquiryId TableBAR.InquiryId%TYPE



AS BEGIN SELECT DISTINCT

	FOO.InquiryID,
	BAR.InquiryId "BAR_EXISTS"

FROM
	TableFOO FOO,
	TableBAR BAR

WHERE
	FOO.InquiryID = BAR.InquiryID
	and FOO.Stage = 'EMAILED'
	and FOO.MailDate <= (SYSDATE - P_SendInterval);

RETURN
V_InquiryID AND V_BARInquiryId;
end;

Nothing in the documentation is clicking, so I think I'm taking the wrong approach.

Any pointers or tips are much appreciated.

Thanks,

Stacey

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Feb 19 1999 - 12:20:03 CST

Original text of this message

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