不用添加用户名吧,这么长。
SELECT   
e.VacationHours, 
e.LoginID, 
d.Name   
FROM   HumanResources.Employee e
INNER   JOIN   HumanResources.EmployeeDepartmentHistory edh
ON   e.EmployeeID = edh.EmployeeID 
INNER   JOIN   HumanResources.Department d
ON   edh.DepartmentID = d.DepartmentID 

解决方案 »

  1.   

    测试了下 , 好象并不存在你说的问题just like:select master.dbo.sysprocesses.spid
    from    master.dbo.sysprocesses.spid
    where     master.dbo.sysprocesses.spid = 1
      

  2.   

    USE AdventureWorks SELECT A.VacationHours
          ,A.LoginID
          ,C.Name 
    FROM HumanResources.Employee as A INNER JOIN  
         HumanResources.EmployeeDepartmentHistory as B ON A.EmployeeID=B.EmployeeID INNER JOIN 
         HumanResources.Department as C ON B.DepartmentID=C.DepartmentID 一定要写规范,让人易懂,再查找错误。
      

  3.   

    HumanResourses.EmplyeeDepartmentHistory.EmployeeID 这个语句有问题,应该是无法确定记录