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 -> Question about triggers

Question about triggers

From: MAYEKEUL <olivier.debelle_at_gmail.com>
Date: 9 Oct 2006 23:16:08 -0700
Message-ID: <1160460968.084932.176030@e3g2000cwe.googlegroups.com>


Hello everybody,

Petite question existentielle sur les triggers avec oracle.

I want to format my value before insert
In this case, the value is a timestamp

the table name is "MT_LONGTERM" and the fields are

LT_TIMESTAMP - TIMESTAMP
LT_VALUE - NUMBER(8,4) my f... trigger code ;o)

create or replace trigger "MT_LONGTERM_T1" BEFORE
insert on "MT_LONGTERM"
for each row
begin
:NEW.LT_TIMESTAMP:=TO_TIMESTAMP(:NEW.LT_TIMESTAMP,'DD-MON-YYYY HH24:MI:SS');
end;

the reason is when I try to load a CSV file into this table, all date are refused
Even if a try manually, line by line in sql .. Exept if I format the value

So of course, my trigger do not work (:(((

How can i catch my value before insert and apply the format?

Anyone can help me?

Thanks

Mayekeul

Ps: sorry for my bad english, I am too bad!! :( Received on Tue Oct 10 2006 - 01:16:08 CDT

Original text of this message

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