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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Function w/o RETURN clause

Re: Function w/o RETURN clause

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 04 Oct 2005 09:27:00 -0700
Message-ID: <1128443213.76362@yasure>


Boobie wrote:
> Since when can PL/SQL Function without RETURN be compilable ?
> I could swear not in 8i....

Look up PIPELINED TABLE FUNCTIONS.

The following is a good example:

  CREATE OR REPLACE FUNCTION date_table(sdate DATE, edate DATE) RETURN date_array PIPELINED AS

BEGIN
   FOR i IN 0 .. (edate - sdate)
   LOOP
     PIPE ROW(sdate + i);
   END LOOP;
   RETURN;
END date_table;
/

More examples at www.psoug.org in Morgan's Library.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Oct 04 2005 - 11:27:00 CDT

Original text of this message

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