SQL Join query, getting ManagerName
Posted
by user279521
on Stack Overflow
See other posts from Stack Overflow
or by user279521
Published on 2010-03-12T13:36:59Z
Indexed on
2010/03/12
13:47 UTC
Read the original article
Hit count: 213
tsql
I have an tblEmployeeProfile & a tblPersonnel. tblPersonnel is an HR table, that consists of all employees in the company; tblEmployeeProfile contains details about an employee's position.
tblPersonnel.PersonnelID
tblPersonnel.FirstName
tblPersonnel.MiddleName
tblPersonnel.LastName
tblPersonnel.PhoneNumber
tblPersonnel.Email
tblEmployeeProfile.EmployeeID
tblEmployeeProfile.ManagerID
tblEmployeeProfile.DepartmentID
tblEmployeeProfile.JobCategoryID
tblEmployeeProfile.SalaryID
I want to return a record with the following fields: EmployeeID, FirstName, MiddleName, LastName, Email, ManagerFullName
where EmployeeID = @EmployeeID
*tblEmployeeProfile.ManagerID = tblPersonnel.PersonnelID*
I can't seem to get the query correct for getting the ManagerFullName
© Stack Overflow or respective owner