Trigger gives error [message #18850] |
Mon, 18 February 2002 23:05 |
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 |
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;
/
|
|
|
|