Home » SQL & PL/SQL » SQL & PL/SQL » Trigger gives error
Trigger gives error [message #18850] Mon, 18 February 2002 23:05 Go to next message
Rm69
Messages: 39
Registered: January 2002
Member
When l run compile this trigger l get the following error:

PLS-00103: Encountered the symbol "" when expecting one of the following:

( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current.

Made a few changes but l'm not getting anyway.Where am l going wrong?

CREATE OR REPLACE TRIGGER Mis_Security
BEFORE DELETE OR INSERT OR UPDATE
ON TestTable

BEGIN
IF (TO_CHAR(SYSDATE,’dy’) IN (‘sat’,’sun’)) OR (TO_CHAR(SYSDATE,’hh24:mi’)
NOT BETWEEN ’08:30’ AND ’18:30’) THEN
RAISE_APPLICATION_ERROR(-20500,’Table is secured’);
END IF;
END;
Re: Trigger gives error [message #18853 is a reply to message #18850] Tue, 19 February 2002 01:28 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
CREATE OR REPLACE TRIGGER Mis_Security
BEFORE DELETE OR INSERT OR UPDATE
ON Testtable
BEGIN
IF TO_CHAR(SYSDATE,'dy') IN ('sat','sun')
OR TO_CHAR(SYSDATE,'hh24:Mi') NOT BETWEEN '08:30' AND '18:30' THEN
RAISE_APPLICATION_ERROR(-20500,'Table is secured');
END IF;
END;
/
Thank You [message #18854 is a reply to message #18850] Tue, 19 February 2002 02:05 Go to previous message
Rm69
Messages: 39
Registered: January 2002
Member
Thanks works like a charm now.
Previous Topic: SQL Performance
Next Topic: Create Table Dynamically
Goto Forum:
  


Current Time: Wed Apr 24 01:54:45 CDT 2024