You are currently offline, waiting for your internet to reconnect

A CROSS JOIN clause is automatically inserted into an UPDATE statement that uses an INNER JOIN clause when you execute the statement in the SQL pane of SQL Server Management Studio

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

SYMPTOMS
In Microsoft SQL Server 2005, you have an UPDATE statement that uses an INNER JOIN clause. When you execute the statement in the SQL pane of SQL Server Management Studio, a CROSS JOIN clause is automatically inserted into the UPDATE statement.
WORKAROUND
To work around this problem, execute the statement in a query window in SQL Server Management Studio.

To open a query window, click New Query in SQL Server Management Studio.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION

Steps to reproduce the problem

  1. Start SQL Server 2005 Management Studio.
  2. Click New Query to open a query window, and then execute the following statement:
    CREATE DATABASE MyDBGOUSE MyDBGOCREATE TABLE Table1 (Col1 int, Col2 nchar(10))GOCREATE TABLE Table2 (Col1 int, Col2 nchar(10))GOINSERT INTO Table1 VALUES (1, ‘Value1’)GO
  3. In Object Explorer, expand Databases, expand MyDB, expand Tables, right-click the Table1 table, and then click Open Table.
  4. On the Query Designer menu, point to Pane, and then click SQL.
  5. In the SQL pane, execute the following statement:
    UPDATE Table1SET Col2 = 'AAA'FROM Table1 INNER JOIN Table2 on Table1.Col1 = Table2.Col1
Properties

Article ID: 953119 - Last Review: 05/27/2008 21:41:19 - Revision: 1.1

Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2005 Workgroup Edition, Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition

  • kbexpertiseadvanced kbtshoot kbprb KB953119
Feedback
/html>>