Forum Replies Created

Viewing 15 posts - 256 through 270 (of 275 total)

  • RE: How do I reload Judges table?

    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

  • RE: How do I reload Judges table?

    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

  • RE: Selecting the earliest month wrapping January to December

    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

  • RE: How do I reload Judges table?

    . 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

  • RE: Selecting the earliest month wrapping January to December

    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

  • RE: If Date value is less than current date set date value to today

    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

  • RE: Selecting the earliest month wrapping January to December

    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

  • RE: Splitting One Row Data into Two Rows

    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

  • RE: How do I reload Judges table?

    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

  • RE: How do I reload Judges table?

    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

  • RE: Splitting One Row Data into Two Rows

    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

  • RE: accumulating

    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

  • RE: Cross Tab for Non-Aggregated Data

    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

  • RE: Selecting the earliest month wrapping January to December

    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

  • RE: Selecting the earliest month wrapping January to December

    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

Viewing 15 posts - 256 through 270 (of 275 total)