BUG: Immediate Updating Subscriber Builds Trigger Incorrectly (199223)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q199223
BUG #: 52381 (SQLBUG_70)

SYMPTOMS

The Immediate Updating Subscriber publication builds the trigger on the subscribing table incorrectly. Instead of referring to the INSERTED table, the trigger refers to the source table.

WORKAROUND

Change the trigger to refer to the INSERTED table.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

MORE INFORMATION

For example, suppose that you are filtering the "authors" table in the "pubs" database to publish only the rows for the states that have a matching value in the "states" table.

The WHERE clause built in the trigger is:
Where authors.st exists(select * from states where states.st = authors.st)
				
Instead, modify the trigger to be:
Where authors.st exists(select * from states where states.st = INSERTED.st)
				
This problem may also occur if the destination table has a different name.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug KB199223