Skip to content
Advertisement

Trigger causing Maximum trigger nesting level exceeded

I have created a new trigger that updates my [Purchase Table] if the number of delivered items equals the ordered quantity, but every time it’s run I get the following error.

ODBC–update on a linked table ‘dbo_Purchase Table’ failed.
Maximum stored procedure, function, trigger or view nesting level exceeded (limit 32). (#217)

This is the trigger that I have created:

Advertisement

Answer

If the value of Delivered is purely based on if the value of deliveredQTY is greater than or equal to QTY I would suggest using a computed column instead, then you don’t need a TRIGGER.

You can’t change an existing column to be a computed column (you can’t even ALTER a computed column) you would need to DROP the column and then add it:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement