|
So we need to do a recursive query to build the chain of command. Our
table is this:
userId
name
emailAddr
supervisor
...
For a project, we need to figure out the chain of command for a particular
user so we can email all levels. I know about recursive queries and have
helped build one on MS SQL Server. I guess it isn't supported on V5R3 and we
have no immediate plans to upgrade to V5R4 yet (supposedly is supported). So
I need alternatives to do build this.
I could do a recursive subprocedure but how would I handle the rows
returned? It could be 2 rows or it could be 10 rows (I would hope no more
than 4). I want to keep this as dynamic as possible, if possible. Is there
another way in SQL?
What are you recommendations?
--
Mike Wills
http://www.linkedin.com/in/mikewills
Blog - http://mikewills.name
Podcasts - http://podcastmike.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.