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: Dates in oracle 8i

Re: Dates in oracle 8i

From: Jeffrey Hunter <Jeffrey.Hunter_at_marconi.com>
Date: Mon, 5 Nov 2001 16:20:23 -0500
Message-ID: <9s6vl1$blj$1@newsfeed.pit.comms.marconi.com>


I agree. There must be a trigger firing on pre-insert:

SQL> create table t1 (v1 number, v2 number, d1 date); SQL> insert into t1 (v1,v2,d1) values (1,2,to_date('09/04/2001 10:23:08','DD/MM/YYYY HH24:MI:SS'));
SQL> select * from t1;

        V1 V2 D1
---------- ---------- ---------

         1 2 09-APR-01 OK.....

SQL> select * from all_triggers where table_name = 'T1';

Good luck...

Regards,
-- jeff



Jeff Hunter
Sr. Database Administrator
http://www.idevelopment.info
jhunter_at_idevelopment.info

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:1004964521.5106.0.nnrp-12.9e984b29_at_news.demon.co.uk...
>
> Is it possible that your table has a pre-insert
> trigger that replaces the incoming value
> with SYSDATE; but no corresponding
> pre-update trigger ?
>
>
> --
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
> Host to The Co-Operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
> Author of:
> Practical Oracle 8i: Building Efficient Databases
>
> Screen saver or Life saver: http://www.ud.com
> Use spare CPU to assist in cancer research.
>
> Antonio wrote in message
> <3604814d.0111050423.32fbf0c8_at_posting.google.com>...
> >Hi!
> >
> > I am making an insert from sqlplus into a table that have a date
> >column. I use the TO_DATE function like:
> > insert into t1 (v1,v2,d1) values (1,2,to_date('09/04/2001
> >10:23:08','DD/MM/YYYY HH24:MI:SS'));
> > Insert goes well excepting that the date inserted is the sysdate.
> >
> > v1 v2 d1
> >---------------------
> >1 2 05-NOV-2001
> >
> > If I make an update, it works well ...
> > update t1 set d1=to_date('09/04/2001 10:23:08','DD/MM/YYYY
> >HH24:MI:SS');
> >
> > v1 v2 d1
> >---------------------
> >1 2 09-APR-2001
> >
> > Somebody knows why it happens????
> >
> > Thanx in advance!
>
>
Received on Mon Nov 05 2001 - 15:20:23 CST

Original text of this message

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