You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTEmpWithTerrs.FirstName,
EmpWithTerrs.LastName,
EmpWithTerrs.TerritoryDescription,
Regs.RegionDescriptionFROM (
SELECTe.firstname,
e.lastname,
t.*FROM Employees e
INNER JOIN EmployeeTerritories et ONet.EmployeeID=e.EmployeeIDRIGHT JOIN Territories t ONt.TerritoryID=et.TerritoryID
) AS EmpWithTerrs
INNER JOIN
(
SELECT*FROM Region r
) AS Regs ONRegs.RegionId=EmpWithTerrs.RegionIdWHEREEmpWithTerrs.FirstName='Robert'OREmpWithTerrs.FirstName IS NULLORDER BY2, 1
The inner join between regions and territories should be performed before the outer join.
The text was updated successfully, but these errors were encountered:
Ported from CodePlex
The inner join between regions and territories should be performed before the outer join.
The text was updated successfully, but these errors were encountered: