BUG: Update Syntax Allows Ambiguous Tablenames/AliasesLast reviewed: May 2, 1997Article ID: Q151113 |
The information in this article applies to:
SYMPTOMSIn an update statement, if you specify a particular table/alias name for the table to be updated, and specify a different tablename/alias as a prefix to the column(s) to be updated, no errors are generated.
WORKAROUNDNo workaround is required. The only table that will be updated is the table that you specify with the UPDATE, irrespective of any aliases that you use in the SET clause.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe following script demonstrates this problem. create table t1 (x int) go
/* Example 1 */update t1 set arbitrary.x = 10 go
/* Example 2 -> ONLY FOR SQL SERVER 6.5 */update a set b.x = 10 from t1 a, t1 b go
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |