Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Create a user defined function
Alexander Mueller wrote:
> Alexander Mueller schrieb:
>
>> Laurenz Albe schrieb: >> >>> Alexander Mueller <millerax_at_hotmail.com> wrote: >>>> I need to create a user defined function that i can embed into >>>> SQL-statements, that returns a string. the objective is to get a 'flat >>>> list' of all employees that are associated to a certain order. >>>> I never wrote a SP or user defined function so i can only show you the >>>> pieces of code that i need to put together: >>> [...] >>> >>>> My Questions: >>> [...] >>> >>> My question: why don't you do it in PL/SQL?
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.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Sun Mar 12 2006 - 12:37:22 CST