I am getting this error after I add a trigger to a table: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32). Here is the trigger:
CREATE TRIGGER dbo.tu_PeopleGeneral
ON dbo.PEOPLEGENERAL
AFTER UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @PeopleCodeID nvarchar(10)
Select @PeopleCodeID = i.People_Code_ID from inserted i
UPDATE PEOPLEGENERAL SET PICTURE_NAME = RTRIM(PICTURE_NAME)
WHERE PEOPLE_CODE_ID = @PeopleCodeID
END
I want a trigger that will trim any spaces from the end of the data that the user is attempting to update. I have a similar insert trigger that works just fine. I'm not sure why it will not work for updates.