× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You know... never mind, I with how the rest of the program works (now that I
look deeper at it), a recursive function should work fine.

On 7/20/07, Mike <koldark@xxxxxxxxx> wrote:

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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.