melissa820
05-24-2006, 07:34 PM
I have this trigger that occurs whenever a row is updated.
My question is, if the raiserror is reached, does it post to a log file?
Thanks in advance!
CREATE TRIGGER res_Update
ON Resort
FOR UPDATE
AS
DECLARE @RNstars int, @RNstars2 int
SELECT @RNstars = inserted.resNumStars, @RNstars2 = deleted.resNumStars
FROM Inserted, Deleted
WHERE deleted.resID = inserted.resID
If @RNstars < @RNstars2
BEGIN
RAISERROR(‘unable to reduce rating’,16,1)
ROLLBACK TRANSACTION
END
My question is, if the raiserror is reached, does it post to a log file?
Thanks in advance!
CREATE TRIGGER res_Update
ON Resort
FOR UPDATE
AS
DECLARE @RNstars int, @RNstars2 int
SELECT @RNstars = inserted.resNumStars, @RNstars2 = deleted.resNumStars
FROM Inserted, Deleted
WHERE deleted.resID = inserted.resID
If @RNstars < @RNstars2
BEGIN
RAISERROR(‘unable to reduce rating’,16,1)
ROLLBACK TRANSACTION
END