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: Create a user defined function

Re: Create a user defined function

From: Alexander Mueller <millerax_at_hotmail.com>
Date: 13 Mar 2006 06:32:57 -0800
Message-ID: <1142260377.583323.233040@e56g2000cwe.googlegroups.com>


Laurenz Albe schrieb:

> DA Morgan <damorgan_at_psoug.org> wrote:

> >> CREATE OR REPLACE FUNCTION "UF_EMPLIST"
> >> (
> >> id in int,
> >> delim in VARCHAR2 default ';'
> >> )
> >>
> >> return VARCHAR2
> >> is

> >> /* declare select for cursor */
> >> cursor empCursor is

> >>
> >> str_return VARCHAR2(32767);
> >> str_val VARCHAR2(255);
> >>
> >> begin
> >>
> >> /* open empCursor */
> >> open empCursor;
> >>
> >> loop

[lost of conditions]

> >> end UF_EMPLIST_ORDER;
> >
> > Solved it perhaps but with horribly inefficient code. There is
> > almost no place in Oracle (9i or above) where a cursor loop is
> > a good idea.
> >
> > Take a look at array processing instead. You will find examples
> > in Morgan's Library at www.psoug.org. Click on Bulk Binding.

>

> Maybe performance is not an issue here.
>
Hi Laurenz and Daniel

thanks you both for your response,

okay i'll give the array solution a try, since performance is an issue

Best regards,
Alex Received on Mon Mar 13 2006 - 08:32:57 CST

Original text of this message

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