When I run this...
SELECT ProjectTbl.ProjectName, ProjectTbl.ProjectID, ProjectTbl.AssignedTo, ProjectTbl.DueDt, PriorityTbl.PriorityName, DerivedTbl.FName,
DerivedTbl.LName, TaskTbl.TaskID, TaskTbl.TaskName
FROM ProjectTbl INNER JOIN
PriorityTbl ON ProjectTbl.PriorityID = PriorityTbl.PriorityID LEFT OUTER JOIN
TaskTbl ON ProjectTbl.ProjectID = TaskTbl.ProjectID LEFT OUTER JOIN
(SELECT UserTbl.FName, UserTbl.LName, ProjectUserTbl.ProjectID
FROM UserTbl INNER JOIN
ProjectUserTbl ON UserTbl.UserID = ProjectUserTbl.UserID) AS DerivedTbl ON ProjectTbl.ProjectID = DerivedTbl.ProjectID
WHERE (ProjectUserTbl.ProjectID = 1439)
I get this error...
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "ProjectUserTbl.ProjectID" could not be bound.
It seems to be choking on the derived table, but I'm not sure why.
I've searched this error and made sure I'm referencing the columns by their table names, checked case sensitivity, etc.
Can someone shed some light?