We help IT Professionals succeed at work.

Query issue: multi-part identifier could not be bound

Medium Priority
1,438 Views
Last Modified: 2012-08-12
Hi Experts,  

The following query returns an error of the multi-part identifier dbo.tbDA_Day_Date could not be bound. Can you help?

WITH FirstCreation AS (SELECT     dbo.tbDA_Day_Date, MIN(ttbDA_Day_dateCreated) AS FirstCreatedDate
                                                  FROM          dbo.tbDA_Day
                                                  GROUP BY dbo.tbDA_Day_Date)
    SELECT     Main.tbDA_Day_date, Main.tbDA_Day_Comments, FirstCreation_1.FirstCreatedDate
     FROM         dbo.tbDA_Day AS Main INNER JOIN
                            FirstCreation AS FirstCreation_1 ON Main.tbDA_Day_date = FirstCreation_1.tbDA_Day_Date
     WHERE     (Main.tbDA_Day_isDeleted = 0)

Open in new window


 Thanks,

Thomas
Comment
Watch Question

CERTIFIED EXPERT
Commented:
dbo.tbDA_Day_Date is not a field you are missing a dot

Commented:
columns dont have any schema identifier... try this


WITH FirstCreation AS (SELECT     tbDA_Day_Date, MIN(ttbDA_Day_dateCreated) AS FirstCreatedDate
                                                  FROM          dbo.tbDA_Day
                                                  GROUP BY tbDA_Day_Date)
    SELECT     Main.tbDA_Day_date, Main.tbDA_Day_Comments, FirstCreation_1.FirstCreatedDate
     FROM         dbo.tbDA_Day AS Main INNER JOIN
                            FirstCreation AS FirstCreation_1 ON Main.tbDA_Day_date = FirstCreation_1.tbDA_Day_Date
     WHERE     (Main.tbDA_Day_isDeleted = 0)
Top Expert 2008

Author

Commented:
doh! Thanks a ton.

Thomas

Explore More ContentExplore courses, solutions, and other research materials related to this topic.