I am trying to perform an update on a table that has the following update trigger but I am getting the following error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Here is the trigger...
If the value of photoRatingID is set to NULL then it deletes records from another table
IF UPDATE(photoRatingID)
BEGIN
IF (SELECT photoRatingID FROM inserted) IS NULL
BEGIN
DELETE mbr_Media_Approval_Primary
FROM deleted, mbr_Media_Approval_Primary
WHERE deleted.mbrID = mbr_Media_Approval_Primary.mbrID
END
END
All tables contain the unique ID 'mbrID'