I wonder if the join using the subquery would mean the query first selects all records that match code 805 and then does the join, or it would select only those from EmpItems that actually do match the where clause?
Let's say the EmpItems table has a lot of records, would the first join be substantially faster than the second?
...
LEFT OUTER JOIN EmpItems
ON Employees.emKey = EmpItems.itEmKey AND EmpItems.itCode = 10
LEFT OUTER JOIN
(SELECT EmpItems.itEmKey AS itEmKey,
EmpItems.itPerc AS SpecialPerc
FROM EmpItems
WHERE EmpItems.itCode = 805)
AS Item805
ON Employees.emKey = Item805.itEmKey
Christian Isberner
Software Consultant