Microsoft
Software
Hardware
Network
Question : SQL needs to gets info from Inner Join on two Fields
I have two fields in this query that display Employee IDs on a report but I need them to both display Employee Names instead. I can get the name to come back with an inner join for one field but I don't know how to make it come back for 2 fields.
In order to get the employee name, they need to reference tblEmployees to get the "name" of the employee instead of the ID.
SELECT tblActions.intActionID, tblActions.intIncidentID, tblActions.intAction, tblActions.intEmployeeID, tblActions.intSupervisorID
, tblActions.datActionDate, tblEmployee.txtEmployee
FROM tblActions INNER JOIN tblEmployee ON tblActions.intEmployeeID = tblEmployee.intEmployeeID;
How do I get intSupervisorID to reference tblEmployee and display the employee name?
Answer : SQL needs to gets info from Inner Join on two Fields
Sorry, didn't realize it was access. I believe parens will solve:
SELECT tblActions.intActionID, tblActions.intIncidentID, tblActions.intAction, tblActions.intEmployeeID, tblActions.intSupervisorID
, tblActions.datActionDate, E1.txtEmployee
as EmployeeName, E2.txtEmployee as SupervisorName
FROM (tblActions INNER JOIN tblEmployee E1 ON tblActions.intEmployeeID = E1.intEmployeeID )
INNER JOIN tblEmployee E2 ON tblActions.intSupervisorID
= E2.intEmployeeID
Random Solutions
Winsock error in XP Professional Error 12029 Provider entry MSAFD Could not make an HTTP connection.
use php to create a xml tree and iterate over that tree in jquery
How could i distribute internet to users connected to windows server 2008 R2 ????
Having mail server go out a specific SonicWALL interface?
SEND AS Permissions problem
Need to monitor specific events in SCOM 2007 R2
Replace VPN with MPLS link
SQL
Conditional selections in setup project
how to prove power surge damage