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

Home -> Community -> Usenet -> c.d.o.server -> Re: Will select work within a FUNCTION?

Re: Will select work within a FUNCTION?

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Wed, 11 Aug 1999 22:34:06 +0200
Message-ID: <934403658.4574.0.pluto.d4ee154e@news.demon.nl>


Yes, it can. But only use it very very sparingly, and if there are no other solutions available.
Your select will be treated as recursive sql, it will NOT be merged into your main select.
My previous firm used it everywhere, and it was a performance disaster.

Hth,

Sybrand Bakker, Oracle DBA

Nandakumar <nanban_at_my-deja.com> wrote in message news:7osdai$irm$1_at_nnrp1.deja.com...
> Can someone tell me if 'select' can be used inside a function to query a
> table and return the value to the calling routine?
>
> Actually there are two tables T1(code1, code2,code3 )and
> T2(code,codename). code1, code2,code3 columns of T1 reference code of
> T2.
>
> I want to display the result as
> CodeName1, CodeName2, CodeName3
> where CodeName1 is the codename in T2 for code = code1 of T1,
> CodeName2 is the codename in T2 for code = code2 of T2.
>
> I already have a solution using Self joins.
>
> But i am looking for something like in
>
> select func(code1), func(code2), func(code3) from T1;
>
> The func(code) will fetch the codename for the passed code, from the
> table T2.
>
> I request your comments on the feasibility of this method.
> Thanks
> --
> Nandakumar
> Systems Analyst
> New York
> (N.Kumar_at_rocketmail.com)
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Wed Aug 11 1999 - 15:34:06 CDT

Original text of this message

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