Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query Problem
Message
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Divers
Thread ID:
01520976
Message ID:
01521454
Vues:
14
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform