TastyWheat
Registered User.
- Local time
- Today, 01:28
- Joined
- Dec 14, 2005
- Messages
- 125
Here's the root of all my troubles:
This query works perfectly fine by itself. It's supposed to find the most recent store ID for each employee and it does. However, if I use that query inside another query I get the error, "The Microsoft Jet database engine does not recognize 'SC.EmployeeID' as a valid field name or expression." I've tried changing the original query slightly, but there isn't much I can do without ruining my functionality.
Code:
SELECT EmployeeID, NewStoreID As HomeStore
FROM [Store Change] AS SC
WHERE EffectiveDate=(
SELECT Max(EffectiveDate)
FROM [Store Change]
WHERE SC.EmployeeID=EmployeeID
);