Home » SQL & PL/SQL » SQL & PL/SQL » Trigger error (Oracle 10g Rel2, Linux AS4)
Trigger error [message #364503] Mon, 08 December 2008 21:45 Go to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Hello ,

I'm trying to write a trigger and getting the compilation errors and not knowing where the problem is lying.Below is the trigger code:


CREATE OR REPLACE TRIGGER WVO_DBA_MONITOR.BI_WVO_SD
BEFORE
INSERT
ON WVO_STORAGE_DETAILS
REFERENCING NEW AS NEW
FOR EACH ROW
DECLARE lv VARCHAR2(10);
BEGIN
:NEW.measure_date := SYSDATE;
:NEW.usedpercent := ROUND((:NEW.USED_SPACE/:NEW.Total_SPACE)*100);

INSERT INTO WVO_HOST_GROWTH_PREDICTION (HOST_NAME , FILENAME,USEDAMOUNT ,AVAILAMOUNT , MEASURE_DATE, USEDPERCENT)
VALUES (:NEW.HOST_NAME ,:NEW.FILE_NAME ,:NEW.USED_SPACE,:NEW.FREE_SPACE,:NEW.measure_date,:NEW.usedpercent);

INSERT INTO WVO_GROWTH_PREDICTION (HOST_NAME,FILENAME ,USEDAMOUNT,AVAILAMOUNT , MEASURE_DATE)
VALUES (:NEW.HOST_NAME ,:NEW.FILE_NAME ,:NEW.USED_SPACE,:NEW.FREE_SPACE,:NEW.measure_date);

END;
/


Can somebody help me out where the problem is lying.

Regards,
Raj
Re: Trigger error [message #364514 is a reply to message #364503] Mon, 08 December 2008 23:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
180 posts and you don't know how to post, you deserve no answer.

Regards
Michel

[Updated on: Tue, 09 December 2008 01:20]

Report message to a moderator

Re: Trigger error [message #364548 is a reply to message #364503] Tue, 09 December 2008 01:11 Go to previous message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I'm trying to write a trigger and getting the compilation errors and not knowing where the problem is lying

As we don't have tables you use, we'd get errors too if we tried to run this CREATE TRIGGER script. However, our errors would be different from yours.

So, if you don't tell us which errors you got or provide a complete test case (CREATE TABLE, for example), all we can do is guessing.
Previous Topic: Views underlying table on separate machine
Next Topic: Request for a specefic date?
Goto Forum:
  


Current Time: Thu Dec 08 08:08:14 CST 2016

Total time taken to generate the page: 0.10034 seconds