chrisryhal
asked on
Trigger Quick Problem
I could probably figure this out, but I got so much going on.
I am trying to create a trigger. Here is the SQL:
CREATE TRIGGER TL_Calibration_Date_Trigge r_Ins
ON TL_Calibration
AFTER INSERT
UPDATE TL_Calibration SET [Next Calib] = DATEADD(day, InspectionFrequency, [Last Calibrated])
GO
The actual "Update" statement DOES work, but it don't seem to work in the trigger creation. I am getting "Error Near Update"
Thanks,
CR
I am trying to create a trigger. Here is the SQL:
CREATE TRIGGER TL_Calibration_Date_Trigge
ON TL_Calibration
AFTER INSERT
UPDATE TL_Calibration SET [Next Calib] = DATEADD(day, InspectionFrequency, [Last Calibrated])
GO
The actual "Update" statement DOES work, but it don't seem to work in the trigger creation. I am getting "Error Near Update"
Thanks,
CR
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
CREATE TRIGGER TL_Calibration_Date_Trigge
ON TL_Calibration
AFTER INSERT AS
UPDATE TL_Calibration SET [Next Calib] = DATEADD(day, InspectionFrequency, [Last Calibrated])
GO