@ Dagon
I corrected it and tryed.
CREATE OR REPLACE TRIGGER TRIGTEST3
BEFORE DELETE OR UPDATE OF evdate ON event
FOR EACH ROW
BEGIN
IF :OLD.EVDATE >= SYSDATE THEN
RAISE_APPLICATION_ERROR(-20101,'OUT OF RANGE');
--ELSE
-- DELETE FROM cusarrive c , event e where e.eventID = c.eventID AND...
Q- ensure that event records can not be deleted if the "evdate" is not later than the current date
I created the following trigger for this matter.
CREATE OR REPLACE TRIGGER TRIGTEST3
BEFORE DELETE OR UPDATE OF evdate ON event
FOR EACH ROW
BEGIN
IF :OLD.EVDATE >= 'SYSDATE' THEN...
@Dagon
yeahh... I think it is solved...But are those messages suppose to appear
INSERT INTO Event VALUES(005,'11-AUG-2012','18:00',21,9003);
gives the msg-
thanks for the help..
I need to make a trigger which generates an error when value 'AUGUST' is entered as evdata in event.
Q- ensure that event cannot be run in the month of AUGUST.
I created the following trigger but the rows can be entered which include 'AUGUST' as data.
create or replace trigger trigtest
BEFORE...
@Beilstwh
Finally it worked.. But I wonder whether there is a way to insert data to the audit_cus table which is already in cusarrive table.
Thanks alt for the help... [thumbsup2]
@SantaMufasa
i tried that too..
CREATE OR REPLACE TRIGGER QUES2TRIG
BEFORE INSERT OR UPDATE OF cusevaluation ON cusarrive
FOR EACH ROW
DECLARE
cuse NUMBER(1);
BEGIN
select cusevaluation INTO cuse from cusarrive where cusevaluation = 0;
IF :new.cusevaluation = 0 THEN
INSERT INTO audit_cus...
@SantaMufasa
Yeah I used it and tried... Then also data is not inserted into audit table which I have created previously..
and I can't insert data to CusArrive table it throws the following error..
"
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at...
@SantaMufasa
yeah.. i think there must be the problem as if i run the insert statement it will execute and enter data.. i just want to check data (previously inserted and inserting in to the event table).
if u can help t ll be great..
thanks alt
I need to enter data into an audit table using a trigger.. I created the following audit table and trigger... trigger dsnt give the expected answer...
Q - if a customer gives a 0 evaluation, the details of the attendance must be placed in an audit table..
-- cusarrive is the table which has...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.