Re: Selecting the current time

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 2000/02/16
Message-ID: <hqblas8vevis3bs76dl85ibr2s1kgh6tlr_at_4ax.com>#1/1


A copy of this was sent to "Harvey" <youdecide_at_yahoo.com> (if that email address didn't require changing) On Wed, 16 Feb 2000 16:01:17 +1100, you wrote:

>I think you'll find there is a TIME.
>
>Connect as SYSTEM, and try "select Time from dual;"
>

Maybe someone at your site has written a function TIME? Time is not a psuedo column in Oracle. Consider:

system_at_8i> select time from dual;
select time from dual

       *
ERROR at line 1:
ORA-00904: invalid column name

system_at_8i> create function time return varchar2   2 as
  3 begin
  4 return to_char( sysdate, 'hh24:mi:ss' );   5 end;
  6 /

Function created.

system_at_8i> select time from dual;

TIME



09:15:36

Look for an object time in your dba_objects table.....

>DanHW wrote in message <20000215235131.01561.00001445_at_ng-fp1.aol.com>...
>>>Does anyone know what privileges a User needs in order to "select Time
 from
>>>dual"??
>>>
>>
>>Try...
>>select sysdate from dual
>>
>>there is no Oracle function TIME...
>>
>>If you want the time component of the date field, use the to_char function,
>>with a date format...
>>
>>select to_char(sysdate,'HH24:MI:SS') from dual will return a string with
 the
>>current time (in 24h notation)
>>
>>Dan Hekimian-Williams
>

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Wed Feb 16 2000 - 00:00:00 CET

Original text of this message