Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Question about triggers
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