I have a csv file with userid and manager fields. How can I list all userids that report to a specific manager and its direct reports, drilled down to the last user. Need a quick vbscript.
Thanks.
I have a csv file with userid and manager fields. How can I list all userids that report to a specific manager and its direct reports, drilled down to the last user. Need a quick vbscript.
Thanks.
You need a <final_result>
variable (initially empty), and a <managers>
variable (initially the ID of the one manager you want to create a list for).
Then write a loop that does:
SELECT DirectReports FROM TextFile WHERE Manager IN ('<managers>')
DirectReports
IDs from the resulting RecordSet
<final_result>
variable<managers>
variable a comma delimited string: "'<id1>','...','<idn>'"
When the loop is through, the final result variable holds all the direct reports.
See - no recursion required. Plain iteration is enough.