Article ID: 915074 - View products that this article applies to.
Bug #: 406684 (SQLBUDT)
In Microsoft SQL Server 2005, you may receive the following error message when you try to use the DELETE statement to delete rows from a remote table that is located on a linked server:
This issue occurs when all the following conditions are true:
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 208, Level 16, State 1, Line 1
Invalid object name 'A'.
To work around this issue, use one of the following methods.
Method 1: Use a WHERE clauseUse a WHERE clause in the DELETE statement to enforce a different join strategy between two tables. For example, work around this issue by using a Transact-SQL statement that is similar to the following:
Method 2: Do not use an aliasDo not use an alias in the statement. Therefore, you must directly use the column name to reference the column in the ON clause. You can use this method if the column name that is used in the ON clause is unique in all the columns that this statement mentions.
For example, you may use the following statement:
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Article ID: 915074 - Last Review: March 18, 2006 - Revision: 1.1