Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function

Status
Not open for further replies.
Jun 12, 2009
123
GB
Hi All,

please can you advise how the following is possible?

select *
from table1
where
trunc(started) >= '09-Aug-2010'
and started < sysdate

The line
trunc (started) i.e. field is not even available in the table, how can this work I am lost?

Many Thanks

 
You are right - if there is no column called started in table1, it will NOT work.
 
It's total speculation without being able to see your database, but one possibility is that there is a function called started e.g.

Code:
CREATE OR REPLACE FUNCTION STARTED RETURN DATE IS
BEGIN
  RETURN SYSDATE;
END;
/

select * 
from DUAL
where
trunc(started) >= '09-Aug-2010'
and started < sysdate


For Oracle-related work, contact me through Linked-In.
 
informer30 said:
that's brill dragon...
Although dragons may be brill, our friend and colleague, Dagon, is even more brill. <grin>

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
Just "funnin' ya'" informer30.

Your boundless energy is admirable, too, informer.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top