Viewing 15 posts - 256 through 270 (of 274 total)
And I'm curious, if my code is 100% accurate
But your code is not accurate at all.
The total number of cases a judge has is ABSOLUTELY IRRELEVANT to assigning cases for...
June 10, 2010 at 12:47 pm
In other words, during round one, each of the 12 judges should have one case, and one case only, unless that case is Transfer Case, in which case it doesn't...
June 10, 2010 at 12:20 pm
I used month 10 as the cutoff because if month 9 and month 1 are present, the max of 2 will be exceeded, so the actual max variance is irrelevant...
June 10, 2010 at 11:26 am
. As you have explained it, all you really need to know is which judges have had fewer cases assigned to them than other judges.
That's not true here, because of...
June 10, 2010 at 11:21 am
I think so.
It was fairly clear when he said month 11 was "before" month 1 that some other month was controlling the sequence.
For convenience, I used MONTH(GETDATE()), since it was...
June 10, 2010 at 9:54 am
You've got it. You can do the same type of thing in the WHERE clause. For example, using the data you mentioned in your original q:
DECLARE @filterStart DATETIME
DECLARE...
June 10, 2010 at 9:25 am
Did anyone even look at the code I posted that, to me, seems to get the answers desired??
June 10, 2010 at 7:43 am
You might want to look into the use of [0-9] and [^0-9] just to simplify the code a bit.
Except I've had some odd results sometimes from that :unsure:. So,...
June 10, 2010 at 7:41 am
You should not delete all rows in the CASES table when the judgewheel table is empty. There's no need to. Why won't the simpler to implement judgeswheel table...
June 10, 2010 at 7:38 am
One way would be to create another table, say,
JudgesAvailable[ThisWheel] (or whatever name).
You pull your judge for the next case randomly from there, then delete that judge from that table....
June 9, 2010 at 4:43 pm
Yes, I too don't think a tally table is needed here.
But I think the code should output two rows -- to match the original request 🙂 -- and be able...
June 9, 2010 at 10:01 am
I urge you to make this a computed column on the main table if possible. That way the definition is coded only once and thus can easily be changed...
June 8, 2010 at 4:42 pm
Quite true about using "ELSE 0", and I was tempted to make that change myself, but stuck to the original requestor's original code :-).
June 8, 2010 at 4:09 pm
Yikes, looks like crap w/o the proper spacing.
Why are leading spaces stripped when dealing with CODE posts???? :angry:
June 8, 2010 at 4:07 pm
This query shows *all* results, including the NULLs, just for confirmation.
You will need to replace MONTH(GETDATE()) with renewal month -- wasn't sure what the "magic month" 🙂 would end up...
June 8, 2010 at 4:06 pm
Viewing 15 posts - 256 through 270 (of 274 total)