Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using pipelined functions
Carlos Correia wrote:
> Hi,
>
> I have a function with the following signature :
>
> FUNCTION FP_NEWFORMAT(searchKey VARCHAR2, QTY NUMBER) RETURN
> AVA_COLLECTION PIPELINED;
>
> basically the number of lines in the function has now exceeded 200
> lines which means it is unreadable (almost). What i need to do is
> refactorise this function, effectively splitting it up into sub
> functions called from this main application.
>
> How would i go about doing this.
>
> I'm contemplating creating sub functions that are also pipelined and
> using the OPEN ... FOR to loop through the returned result set.
>
> Is this possible, or do you guys have further suggestions?
> Thanks in advance
200 lines may be large for a function but that, in and of itself, is not justification for creating work. Does the function contain logical segmentation? If so break out one or more segments. But just having 200 lines is not justification.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Wed Jan 05 2005 - 11:49:25 CST