Question: This is telling me invalid column name FirstName & LastName as it doesn't have a table it is coming from that i can see and

This is telling me "invalid column name "FirstName & LastName" as it doesn't have a table it is coming from that i can see and i need that for this to work. I see the "Person.Person" has first & last name but it wasn't brought in when I asked for help the last few times
design query editor
Q+D Q+E
[.
SQLQuery12.sql - S...(SHIELAlshiel (78))
SQLQuery5.sql - SHI...(SHIELAlshiel (66))*
SQLQuery3.sql - SHI...(SHIELAlshiel (72))*
SELECT E.BusinessEntityID AS EmployeeID, P.FirstName, P.LastName,
D.Name AS DepartmentName,
EPH.RateChangeDate AS LastRaiseDate,
CASE WHEN EPH.RateChangeDate IS NULL OR EPH.RateChangeDate DATEADD(month,-12, GETDATE())
THEN 'No Raise in 12+ Months'
ELSE 'OK' END AS RaiseStatus
FROM HumanResources. EmployeePayHistory EPH
JOIN Person. Person AS P ON E.BusinessEntityID = P.BusinessEntityID
JOIN HumanResources.Employee E ON EPH.BusinessEntityID = E.BusinessEntityID
JOIN HumanResources.EmployeeDepartmentHistory EDH ON E.BusinessEntityID = EDH.BusinessEntityID
JOIN HumanResources.Department D ON EDH.DepartmentID = D.DepartmentID
WHERE EDH. EndDate IS NULL
ORDER BY P.LastName, P.FirstName; q,
I
%
Messages
Msg 4104, Level 16, state 1, Line 7
The multi-part identifier. "E.BusinessEntityID" could not be bound.
Completion time: 2024-05-12T21:13:29.3090921-05:00
Now I'm getting "Multi-Part Identifier E.BusinessEntityID could not be bound. I have sent the same question over & over and nothing is helping me.
 This is telling me "invalid column name "FirstName & LastName" as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!