2010-12-21

The multi-part identifier "deleted.id" could not be bound.

Msg 4104, Level 16, State 1, Procedure Blah, Line 11
The multi-part identifier "deleted.id" could not be bound.


If you receive this error, you probably wrote this:
DELETE [table] WHERE [somethingID] = [deleted].[ID];

Try this instead:
DELETE [table] WHERE [somethingID] IN (SELECT [ID] FROM [deleted]);

2 comments: