Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: inserts with automatic time stamp

Re: inserts with automatic time stamp

From: Barry L. Wallis <Barry.L.Wallis_at_cpmx.saic.com>
Date: Wed, 2 Sep 1998 08:17:18 -0700
Message-ID: <39939142@NEWS.SAIC.COM>


Bernd Goetz wrote in message <35ED14BB.658DA52F_at_tarsec.com>...
>Hi
>
>I've got a log table in which I also want to store the current date and =
time. I do it like this:
>
><<
>insert into applog (pname, pversion, type, userid, created, msg)
> values ('PL', '0.9.0', 'LOGON', 'bgo',
> to_date(to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY =
HH24:MI:SS'),
> 'by hand')
>>>
>
>I didn't find another way of solving this. What do you think? Did I =
miss something? btw: this is
>important: I want to keep the database format as independent from any =
specialities of Oracle as
>possible. Hence no special purpose current time data types are allowed.

[...]

Maybe someone with more knowledge of the SQL standard can comment, but, = I think everything used to populate the 'created' column is specific to = Oracle (hence, special purpose).
--
Barry L. Wallis, Senior Systems Engineer Science Applications International Corporation 4161 Campus Point Court
San Diego, CA 92121

voice: (619) 646-9891, fax: (619) 646-9327 mailto: Barry.L.Wallis_at_cpmx.saic.com



Received on Wed Sep 02 1998 - 10:17:18 CDT

Original text of this message

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