Actually if every team plays every day over the course of 10 days then this is 
not possible. That would be 5 games per day, at 10 days = 50 games. There are 
only 45 possible no repeat combinations.

If you just want a list of all the possible combinations with no repeats this 
SQL will produce those 45 items for you. You could pick from there. 

declare @teamlist table (team tinyint not null);
insert into @teamlist(team)
values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);

        select distinct
                case when a.team < b.team then a.team else b.team end as TEAMA
                ,case when a.team > b.team then a.team else b.team end as TEAMB
        from @teamlist as a
        inner join @teamlist as b
                on a.team <> b.team
        order by teama, teamb
;

> Ya rounds...  like there will be 10 days that all 10 teams will play each 
> other on that day
> 
> I need to pair up the teams so they don't repeat playing each other over the 
> course of the 10 days of games.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357593
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to