Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Problem
Message
General information
Forum:
Microsoft Office
Category:
Access
Title:
Miscellaneous
Thread ID:
01520976
Message ID:
01521454
Views:
13
>You're not going to beleive this... I'm looking at the wrong query!!! Sleep deprivation..
>
>Anyhow, I went back to the report to see if I was just not seeing something, and realized that the report is using this:
>
>
>SELECT Employees.FirstName, 
>       Employees.LastName,
>       Employees.IsActive,
>       Classes.ClassId, 
>       Classes.ClassName, 
>       EmployeeClasses.AttendedDate, 
>       EmployeeClasses.Score, 
>       Stores.StoreId, 
>       Stores.StoreNumber, 
>       Stores.StoreNumber+" - "+Stores.StoreName AS StoreName, 
>       [FirstName] + " " + [LastName] + " - " + Titles.Title AS FullName
>    FROM (((Classes INNER JOIN (Employees INNER JOIN EmployeeClasses 
ON Employees.EmployeeId=EmployeeClasses.EmployeeId
AND Employees.IsActive = True

) ON ClassId=EmployeeClasses.ClassId) 
>    INNER JOIN EmployeeStores ON Employees.EmployeeId=EmployeeStores.EmployeeId) 
>    INNER JOIN Stores ON EmployeeStores.StoreId=Stores.StoreId) 
>    LEFT JOIN Titles ON Employees.TitleId=Titles.TitleId
>    ORDER BY StoreNumber;
>
>
>But I still for the life of me cannot get it to accept "Employees.IsActive=True" anwhere. My problem is that I can't seem to understand this nested JOIN syntax. It doesn't make sense..
>
>IsActive is showing up as a column in the designer, but not in the SQL. How do I add in "Employees.IsActive=True"???????

I think the simplest way will be to insert this condition into JOIN condition. See the change I made.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform