No Quotes around sysdate. Only string within the quotes in SQL.
insert into VALOR(dt_inser) values(sysdate);
--Payam Moghtader
www.2dev.com
-----Original Message-----
From: David NGUYEN
[mailto:oracledba-ezmlmshield-x34906818.[Email address protected]
Sent: Thursday, September 06, 2007 11:01 AM
To: LazyDBA Discussion
Subject: create a very simple trigger...
hi experts,
i just want to create a trigger , that inserts into VALOR(dt_inser)
column the sysdate each time there is a insert commant on the VALOR table.
i dont know how to declare sysdate.
(dt_inser date null) column .
thanks for your suggestions.
CREATE OR REPLACE TRIGGER trg_dt_inser
before insert
on VALOR for each row
begin
insert into VALOR(dt_inser) values('sysdate'); end trg_dt_inser;
david...
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a dba
job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com To
unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page