problem with a trigger
From: BlackEagle <slimane_at_tsk.be>
Date: Wed, 10 Dec 2003 02:33:31 GMT
Message-ID: <%BvBb.69580$oC2.2788492_at_phobos.telenet-ops.be>
Hi everyone,
[Quoted] [Quoted] [Quoted] I have a table reservations with user-id, date... in it. Now I found a trigger to prevent people make changes on table reservations [Quoted] on sunday and any day before 7 am and after 23 pm. it looks like this but I keep get an error like "trigger built with compilation failure"
what can I do to resolve this?
END; / [Quoted] and another question, in table reservations, I want to prevent people make [Quoted] reservations for sundays. because the business is closed that day. what can I add in the trigger for that, or what kind of check constraint can I use instead.
Date: Wed, 10 Dec 2003 02:33:31 GMT
Message-ID: <%BvBb.69580$oC2.2788492_at_phobos.telenet-ops.be>
Hi everyone,
[Quoted] [Quoted] [Quoted] I have a table reservations with user-id, date... in it. Now I found a trigger to prevent people make changes on table reservations [Quoted] on sunday and any day before 7 am and after 23 pm. it looks like this but I keep get an error like "trigger built with compilation failure"
what can I do to resolve this?
[Quoted] [Quoted] CREATE TRIGGER reservations_restriction
BEFORE
DELETE OR INSERT OR UPDATE
ON reservations
BEGIN
IF TO_CHAR(SYSDATE, 'DY') = 'sun') THEN raise_application_error( -20501, [Quoted] ' blah blah blah'); END IF; IF (TO_CHAR(SYSDATE, 'HH24') < 7 OR TO_CHAR(SYSDATE, 'HH24') >= 00) THEN raise_application_error( -20502, ' blahblahblah'); END IF;
END; / [Quoted] and another question, in table reservations, I want to prevent people make [Quoted] reservations for sundays. because the business is closed that day. what can I add in the trigger for that, or what kind of check constraint can I use instead.
[Quoted] ps. don't know if it does a matter but I'm using oracle 9i on xp
to connect to the db username/pwd _at_oradb
[Quoted] thanx in advance... Received on Wed Dec 10 2003 - 03:33:31 CET