I have a short SQL statement that I would like to use in Access, but I am not quite sure of the Access SQL equivalent.
select * from EMPLOYEE_TABLE start with USER_ID in (‘Bubba’,’Babble’) connect by SUPV_ID = prior USER_ID
I am not sure how to code the START WITH and CONNECT BY portions of the SQL. I do have a not so elegant way of doing this by joining the same table in a downward string 11 times & takes 4 queries to give me the desired output. (to cover all bases, I need to expand this to 3 more table listings)
Basically what this does is gives me the Employee_Table listing all employees that would roll up to one of the supervisors listed in the IN statement. As there can be many levels of management between a top tier manager & the lowest worker bee (and dummy roll up ID’s for large orgs), the SQL sample I listed above is much easier to maintain & I think accurate then what I slapped together in Access.
So if anyone can provide me some guidance, that would be much appreciated!
PS: This is currently is being run against a Access table.