Article ID: 928962 - View products that this article applies to.
When you use code that includes an ambiguous column in Microsoft Visual Studio 2005 Team Edition for Database Professionals, the Visual Studio 2005 interpreter cannot determine whether the column belongs to an inner or outer SELECT statement. For example, you try to run the following code example.
When you do this, you receive warning messages that resemble the following.
Warning message 1
Warning message 2
This issue occurs because an unqualified column name appears in a sub-select statement. The Visual Studio 2005 interpreter cannot determine whether the column belongs to the inner SELECT statement or to the outer SELECT statement. For example, the interpreter cannot disambiguate between T2.a and T1.a in the SELECT a statement that is in the "Symptoms" section code example. Therefore, the interpreter treats the column as an ambiguous column. The same issue occurs with the c IS NULL statement. In that case, the column is also flagged as ambiguous.
To work around this issue, you must fully qualify column names in Visual Studio 2005 database code. For example, rewrite the code example that is listed in the "Symptoms" section to resemble the following code example.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Steps to reproduce the problem
Article ID: 928962 - Last Review: December 22, 2006 - Revision: 2.0