Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Returning multiple params from function
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