Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Will select work within a FUNCTION?
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 - 12:53:28 CDT