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: Selecting from fuction

Re: Selecting from fuction

From: Alan Shein <alanshein_at_erols.com>
Date: Thu, 30 Sep 1999 12:46:47 -0400
Message-ID: <7t0434$rj3$1@autumn.news.rcn.net>


>>

I know that on Oracle8 I can use select statement to select from objects

like functions. Can I do that on Oracle 7.3.4?

Also, could you give me a simple example of such a function?

<<

Generally, the syntax is:

SELECT function_name (parameter1, parameter2...) FROM DUAL;

You select the function from DUAL and pass it parameters. For example, here is the usage syntax for a function I created that returns the number of business days between two dates:

SELECT num_business_days ( '01-FEB-99' , '15-FEB-99' ) FROM DUAL;

Or, you can use a built-in function, like sysdate (which takes no parameters):

SELECT sysdate FROM DUAL; Received on Thu Sep 30 1999 - 11:46:47 CDT

Original text of this message

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