-
What is wrong with this? Help.
hi. Anybody know what wrong with my trigger, i even change it to procedure and also there is error.
CREATE OR REPLACE TRIGGER UPDATE_MENTOR
BEFORE INSERT OR UPDATE OR DELETE ON INSTRUCTOR
BEGIN
IF TO_CHAR(MONTHS_BETWEEN(sysdate, date_hired)) > '240'
OR salary>3400 THEN
END IF;
END;
Please help.
-
If months between (is that a number, if so, why are you casting it to character??) is whatever, or salary is greater than whatever, then what? You're missing the "what" part after "then."
-
i can change my statement to this also. even then i still get error, after the i just prompt a message.
CREATE OR REPLACE TRIGGER update_course
BEFORE INSERT OR UPDATE ON instructor
BEGIN
IF MONTHS_BETWEEN (sysdate,date_hired) > 240
OR salary>3400 THEN
DBMS_OUTPUT.PUT.LINE('Mentor is identified');
END IF;
END;
/
thank you..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|