>Using a where clause for accesslvl is NOT improper syntax, why do you think it is?
I'm just saying you cannot use the WHERE so high in the SQL statement - it needs to be near the end or it will cause errors - and I can't put it at the end because it would filter out the dates without associated schedule records.
What I really need is a WHERE type of filter on the records from the first table that won't affect the rest of the joins.
I would normally use an ON ... AND accesslvl <= loUserInfo.AccessLvl in the first INNER JOIN but the statement is just using LEFT and RIGHT joins so I think I'm hosed.
After my post I realized I could create a temporary cursor of allowable accesslvls (from 0 through loUserInfo.AccessLvl) and do an INNER JOIN - THAT would work!
Kogo Michael Hogan
"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?
Ideate Web Site