Microsoft KB Archive/151113

= BUG: Update Syntax Allows Ambiguous Tablenames/Aliases =

Article ID: 151113

Article Last Modified on 10/16/2003

-

APPLIES TO


 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q151113



BUG#: 15178



SYMPTOMS
In 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.



WORKAROUND
No 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.



STATUS
Microsoft 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 INFORMATION
The 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

Keywords: kbbug kbprogramming kbusage KB151113

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.