Charles F. Munat wrote:
Thanks, but the join clause is there, it's just buried in the subqueries. If there is a problem, it is probably that the loop never ends.Or it could be that the answer is exponential, and I just have too many rows in the source table and too deep a graph.I figured out how to do it in the application with one call to the database and a simple recursive method in a class, though, so I'm not going to use a stored function in the DB.
If you have figured it out this way you can even use one of the PL/languages to implement it within the database :-)
Cheers Tino
<<attachment: smime.p7s>>