|
|
-
R Barry Young Commented 10 Months ago through Puzzles
Single-query solution to TC81, Round-Robing Tournament Scheduling
|
-
R Barry Young Solved 10 Months ago through Puzzles
This uses a slight modification of the "Diagonal Scheme" approach to Round-Robin scheduling. The Teams table is cross-joined with itself (within the same leagues), eliminating cases of teams playing themselves. Then the "Diagonal Scheme" is used, convers
|
-
R Barry Young Commented 10 Months ago through Puzzles
Does the output need to be ordered by (LeagueID, Round, HomeTeam) ?
|
-
R Barry Young Commented 3 Years ago through Puzzles
Jeff said ...
I agree with everything you said about sets (heh... you should write a book on sets) but not when it comes to the way triangular joins are typically used and what they must do behind the scenes.
I do, however, agree that a triangula
|
-
R Barry Young Commented 3 Years ago through Puzzles
Barry said...
_____________________________________________________
...the reason why is that the "Sets" of SQL are tables and rowsets, and what constitutes their members (or "elements" in Set Theory) is *not* individual data values or even columns,
|
-
R Barry Young Commented 3 Years ago through Puzzles
Jeff said...
_____________________________________________________
...How many times can a single instance of a single thing exist in a single set, Barry? Triangular joins read each row more than once and are not set based...
____________________
|
-
R Barry Young Commented 3 Years ago through Puzzles
Jeff said...
_____________________________________________________
...Consider this... you good folks do allow recursive CTE's and they are patently not set based any more than a nice "Triangular Join" is...
_______________________________________
|
-
R Barry Young Commented 4 Years ago through Blogs
All you have to do is cast the Varbinary() back to Varchar(). I do it all the time for ServiceBroker:
SELECT CAST(@x as Varchar(MAX))
...
|
-
R Barry Young Commented 4 Years ago through Blogs
All you have to do is cast the Varbinary() back to Varchar(). I do it all the time for ServiceBroker:
SELECT CAST(@x as Varchar(MAX))
...
|