Viewing 15 posts - 256 through 270 (of 275 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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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??
Scott Pletcher, SQL Server MVP 2008-2010
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,...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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....
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
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 :-).
Scott Pletcher, SQL Server MVP 2008-2010
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:
Scott Pletcher, SQL Server MVP 2008-2010
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...
Scott Pletcher, SQL Server MVP 2008-2010
June 8, 2010 at 4:06 pm
Viewing 15 posts - 256 through 270 (of 275 total)