I have composed this trigger:
CREATE OR REPLACE TRIGGER JobCost
after update [clock_out]
ON CIM_TIMECLOCK
BEGIN
INSERT INTO FORJOBCOST
SELECT CIM_FOLDER11.JOB_NUMBER, CIM_FOLDER11.OP_NO,
CIM_FOLDER11.MACHINE, CIM_FOLDER11.QTY_GOOD,
CIM_FOLDER11.QTY_SCRAP, CIM_TIMECLOCK.OPERATOR,
CIM_TIMECLOCK.CLOCK_IN, CIM_TIMECLOCK.CLOCK_OUT,
CIM_FOLDER07.DAT, CIM_FOLDER07.TIM,
CIM_FOLDER07.ACT_CODE, CIM_FOLDER08.VALU
FROM CIM_FOLDER07, CIM_FOLDER11, CIM_TIMECLOCK,
CIM_FOLDER08
WHERE CIM_FOLDER07.SESSION_ID = CIM_FOLDER11.SESSION_ID
AND CIM_FOLDER07.SESSION_ID = CIM_TIMECLOCK.SESSION_ID
AND CIM_FOLDER07.ACT_CODE = CIM_FOLDER08.MEAN_CODE
END;
If I execute the body as a stored procedure it works correctly. But when I try to create it as a trigger (using VB and data project), I get the message "ADO error: ORA-00969: Missing ON keyword".
Any comment or direction would be appreciated!
CREATE OR REPLACE TRIGGER JobCost
after update [clock_out]
ON CIM_TIMECLOCK
BEGIN
INSERT INTO FORJOBCOST
SELECT CIM_FOLDER11.JOB_NUMBER, CIM_FOLDER11.OP_NO,
CIM_FOLDER11.MACHINE, CIM_FOLDER11.QTY_GOOD,
CIM_FOLDER11.QTY_SCRAP, CIM_TIMECLOCK.OPERATOR,
CIM_TIMECLOCK.CLOCK_IN, CIM_TIMECLOCK.CLOCK_OUT,
CIM_FOLDER07.DAT, CIM_FOLDER07.TIM,
CIM_FOLDER07.ACT_CODE, CIM_FOLDER08.VALU
FROM CIM_FOLDER07, CIM_FOLDER11, CIM_TIMECLOCK,
CIM_FOLDER08
WHERE CIM_FOLDER07.SESSION_ID = CIM_FOLDER11.SESSION_ID
AND CIM_FOLDER07.SESSION_ID = CIM_TIMECLOCK.SESSION_ID
AND CIM_FOLDER07.ACT_CODE = CIM_FOLDER08.MEAN_CODE
END;
If I execute the body as a stored procedure it works correctly. But when I try to create it as a trigger (using VB and data project), I get the message "ADO error: ORA-00969: Missing ON keyword".
Any comment or direction would be appreciated!