Sorry, still not clear. I suggest to write out the rules. Or write out the logic for each record.
For the first record, SHEE34, their manager is DAVID. The Access UIDs are for SHEE34, their manager, and lead staff ID.
Same rule for the second record.
For the third record, DAVID22, both SHEE34 and ANJ343 are included in Access UIDs, I guess because David is there manager.
What would the row for Kay look like?
What would the row for Kay's manager look like?
How many levels of nesting are there?
The Boston Area SAS Users Group (BASUG) is hosting our
in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at
https://www.basug.org/events.