FIX: When you use a sub query inside a SELECT clause to access a table source that is defined outside the sub query in Microsoft Visual Studio Team System 2008 Database Edition GDR, you receive a TSD04151 warning message or a TSD03006 error message

Article translations Article translations
Article ID: 970570 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You use a sub query inside a SELECT clause to access a table source that is defined in a FROM clause in Microsoft Visual Studio Team System 2008 Database Edition GDR. The FROM clause is at the same level as the SELECT clause.

If the sub query is inside a Stored Procedure, a Trigger, a Scalar-valuded Function, or a Table-valued Function, you receive the following warning message:
TSD04151: Object type: [schema name].[object name] has an unresolved reference to object [schema name].[table name].
If the sub query is insided a View, or an Inline Function, you receive the following error message:
TSD03006: Object type: [schema name].[object name] has an unresolved reference to object [schema name].[table name].

RESOLUTION

To resolve this problem, upgrade to Microsoft Visual Studio Team System 2008 Database Edition GDR R2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970479 List of fixed issues in the Microsoft Visual Studio Team System 2008 Database Edition GDR R2

Note Microsoft Visual Studio Team System 2008 Database Edition GDR R2 replaces Microsoft Visual Studio Team System 2008 Database Edition GDR.

Steps to reproduce the problem

  1. Create a SQL server 2005 database project in Visual Studio Team System 2008 Database Edition GDR.
  2. Add two tables, one stored procedure, and one view to the project by using the following code:
    CREATE TABLE t1(c1 INT)
    GO
     
    CREATE TABLE t2(c1 INT)
    GO
     
    CREATE PROC p1 
    AS
    SELECT (SELECT * FROM (SELECT t1.c1 FROM t2) tmp) FROM t1
    GO
     
    CREATE VIEW v1 
    AS
    SELECT (SELECT c1 FROM (SELECT t1.c1 FROM t2) tmp) a1 FROM t1
    
  3. Save the project.
You experience the problem that is mentioned in the "Symptoms" section.

Properties

Article ID: 970570 - Last Review: July 16, 2009 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio Team System 2008 Database Edition
Keywords: 
kbsurveynew kbprb kbexpertiseadvanced kbqfe KB970570

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com