Re: Store TIME in the Oracle

  • From: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Sun, 14 Aug 2011 21:46:50 -0300

Thanks, for answers:

I will follow this way:

to_date('01-JAN-2000 '|| to_char(sysdate,'HH24:MI:SS'),'DD-MON-YYYY
HH24:MI:SS')

I will put the date hard code for all lines inserted and the time that must
be saved.

Regards
Eriovaldo


On Sun, Aug 14, 2011 at 9:19 AM, Niall Litchfield <
niall.litchfield@xxxxxxxxx> wrote:

> For two main reasons.
>
> 1) - the good reason - we don't know the dbversion or the tools in use
> here. They *will* understand numbers, they may not understand intervals.
> 2) - the bad reason - I haven't tested & investigated how well interval
> works in practice (stats estimation etc).
>
>
> On Sun, Aug 14, 2011 at 10:21 AM, Timo Raitalaakso <rafu@xxxxxx> wrote:
>
>>
>> Why not use interval day to second to store duration? You get Datetime
>> Arithmetic easier with that.
>> http://download.oracle.com/**docs/cd/E11882_01/server.112/**
>> e17118/sql_elements001.htm#**autoId18<http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#autoId18>
>>
>> --
>> Timo Raitalaakso
>> http://rafudb.blogspot.com
>>
>>
>>  store duration as number of (milli)seconds.
>>>
>>> Niall
>>>
>>
>> --
>> //www.freelists.org/**webpage/oracle-l<//www.freelists.org/webpage/oracle-l>
>>
>>
>>
>
>
> --
> Niall Litchfield
> Oracle DBA
> http://www.orawin.info
>

Other related posts: