Create Cursor curNumber (number i) Insert into curNumber VALUES (1) Insert into curNumber VALUES (4) Insert into curNumber VALUES (6) Insert into curNumber VALUES (10) Insert into curNumber VALUES (11) Insert into curNumber VALUES (14) Insert into curNumber VALUES (15) Insert into curNumber VALUES (18) ** More inserts Select aa.Number as val1, ab.Number as val2; from curNumber aa, curNumber abFor three numbers:
Select aa.Number as val1, ab.Number as val2, ac.Number as val3; from curNumber aa, curNumber ab, curNumber ac>I'm trying to write a formula to work out all the possible combinations of say 2 numbers from a group of 30 numbers ranging from (1 - 50). This formula would need to also work with combinations of 3 or 4 or even 5 numbers as well. The group of numbers may increase from 30 or decrease. I know how to calculate the actual number of combinations I just can't figure how to write the code to list all the combinations. Any help would be greatly appreciated.