RE: create a very simple trigger...

RE: create a very simple trigger...

 

  


Hi David,

Remove the single quote while inserting i.e.

insert into VALOR(dt_inser) values(sysdate);


Regards;
Manish

-----Original Message-----
From: David NGUYEN
[mailto:oracledba-ezmlmshield-x34906818.[Email address protected]
Sent: Thursday, September 06, 2007 4:01 PM
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



============================================================================================================================

Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.

============================================================================================================================

Oracle LazyDBA home page