From: mjswart@yahoo.com (Michael Swart)
Newsgroups: comp.databases.oracle
Subject: A function used in select clause and where clause.
Date: 6 Jun 2003 10:52:32 -0700
Organization: http://groups.google.com/
Lines: 12
Message-ID: <22f04e15.0306060952.7860f82a@posting.google.com>
NNTP-Posting-Host: 216.94.11.178
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1054921952 31531 127.0.0.1 (6 Jun 2003 17:52:32 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 6 Jun 2003 17:52:32 GMT


I am building a query that uses a function I wrote. It does something
similar to the following:

select MYFUNCTION(SALARY)
from EMPLOYEES
where MYFUNCTION(SALARY) > 100000;

My question is: does the MYFUNCTION(SALARY) get executed twice? If so,
how can I rewrite this query to avoid that?

Anyones help would be appreciated and thanks in advance.
Michael Swart

