Re: Seeking recursive solution to replace nested for-loops

From: Dave <davidr21_at_hotmail.com>
Date: 8 Mar 2004 11:49:39 -0800
Message-ID: <8244b794.0403081149.4cdcfd60_at_posting.google.com>


mromano_at_sensis.com (Michelle Romano) wrote in message news:<aaba7f35.0403080712.4dc9e56a_at_posting.google.com>...

> davidr21_at_hotmail.com (Dave) wrote in message news:<8244b794.0403051147.281957af_at_posting.google.com>...
> > Cleaned up the code a little....
> > 
> David,
> 
> This appears to be exactly what I'm looking for!  I do need to take
> some more time to review and understand what you've written, then I'm
> hoping to apply this concept to my coding.  Thank you for taking the
> time to look into this.  I really appreciate it! :-)
> 
> Michelle

Michelle -

That's great, I hope you can use it. You can probably use arrays, objects or other structures to improve on my string-level processing.

Also, the last test should look like this....

select * from table(select get_combos_row(4, '(1,2,3,4,5,6)') from dual);

which will return the results as rows....

LIST



(1,2,3,4)
(1,2,3,5)
(1,2,3,6)
(1,2,4,5)
(1,2,4,6)
(1,2,5,6)
(1,3,4,5)
(1,3,4,6)
(1,3,5,6)
(1,4,5,6)
(2,3,4,5)
(2,3,4,6)
(2,3,5,6)
(2,4,5,6)
(3,4,5,6)

Let me know if you have questions.

Dave Received on Mon Mar 08 2004 - 20:49:39 CET

Original text of this message