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 -> Storing only the time *NOT* the date --- HOW ???

Storing only the time *NOT* the date --- HOW ???

From: Jørgen Haukland <jorgen.hauikland_at_fou.telenor.no>
Date: Tue, 1 Dec 1998 22:00:58 +0100
Message-ID: <741lea$h2f@info.telenor.no>


Hello !

I have loaded (with SQL*Loader) data from an ascii-file on the format HH24MISS in an DATE column in my table. I can read out the time in SQL with

    SELECT TO_CHAR(time_fld, 'HH24:MI:SS') FROM my_table; and that is just fine.

The question is: How do I update my time_fld to store *only* the time (and not the date) ??
When i try (in SQL):

    UPDATE my_table
    SET time_fld =
    (SELECT TO_CHAR(time-fld, 'HH24:MI:SS') FROM my_table);

I get an error (ORA-01843) telling me that I get more than one row in return..

Any suggestion on how to update my time_fld ??

Joergen Haukland
NORWAY Received on Tue Dec 01 1998 - 15:00:58 CST

Original text of this message

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