Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Selecting variables into functions
On 2005-04-11, dsolly_at_gmail.com <dsolly_at_gmail.com> wrote:
> If I have a function:
>
> select F_21_DAY_CALC(to_date('15-Dec-2004', 'dd-Mon-yyyy'), 'PETER',
> 21) from dual
>
> how can I change my variables to select from a temporary table instead?
> I.E.
>
> select F_21_DAY_CALC(select todate from temp), (select name from temp),
> (select number from temp) from dual
You coul be clearer in stating what you want.... Anyway, I think, you want something like
select F_21_DAY_CALC(todate), name, number from temp;
By the way, number is a reserved word and you should not be using it. Verify with select keyword from v$reserved_words.
Rene
-- Rene Nyffenegger http://www.adp-gmbh.ch/Received on Mon Apr 11 2005 - 14:38:37 CDT