|
On Fri, May 8, 2015 at 10:37 AM, Dan <dan27649@xxxxxxxxx> wrote: > Are there any scenarios of which you're aware that would cause this query > to loop endlessly? I'm no SQL expert, but I was wondering this myself. In particular, I am pretty sure I can construct the A calls B and B calls A scenario. When those programs really run, they can terminate via conditions within the code. But when just checking the references, there's no termination condition. (I was going to test this out for myself at some point if no one else brought it up.) If I were writing a program to follow the references, I wouldn't use SQL (not because it can't be done in SQL but because *I* could not do it in SQL). I would keep track of which programs I've visited already, so that I could avoid repeating myself. I don't know if you have circular references in your case, but I had wondered if Jonathan's code would handle them. John Y.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.