Forum Replies Created

Viewing 15 posts - 241 through 255 (of 275 total)

  • RE: Selecting the earliest month wrapping January to December

    lol, you two are funny. I post code that actually works and you keep talking to each other about how "it can't be done". ROFLOL.

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    I am still trying to remember the first time I came across that name = Scott Pletcher; a very famous and respected name.

    Maybe Experts-Exchange? I did *a lot* of...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    ...other code same as before...

    ELSE

    BEGIN

    --no previous case w/ judge found, so assign judge from existing round

    IF NOT EXISTS(SELECT TOP 1 * FROM Round)...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Selecting the earliest month wrapping January to December

    I'll also add what I said before. The data is being inserted in the order of 09, 11, 01 and everyone is just getting lucky with the "sorted" order. It...

    Scott Pletcher, SQL Server MVP 2008-2010

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

    but otherwise (such as in this case) this will result in a table scan even if there is an index on the DueDate.

    You could rephrase the query to avoid...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    For a new case, the client and case parts work exactly as they do now.

    [Note that my design currently means "no client, no case", that is, a case *must*...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    CORRECTION:

    Instead of:

    CREATE INDEX Cases_IX_JudgeID ON Cases (JudgeID)

    Should be:

    CREATE INDEX Cases_IX_01 ON Cases (ClientID, JudgeID)

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Database size quadruples after converting varchar, text to nvarchar

    You should reorganize the table as soon as possible. You almost certainly created a large number of row-forwarding pointers by doubling the size of that many columns.

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    I suggest this something like this for the tables:

    DROP TABLE Cases

    DROP TABLE clients

    DROP TABLE Judges

    CREATE TABLE [dbo].[Judges](

    [JudgeID] [int] NOT NULL CONSTRAINT...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    You have two different approaches you can take:

    1) Leave the base Judge and Case tables alone; instead, create a separate table to control rounds. This is the method I...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    OFF-TOPIC

    So, how does your count method handle all the situations I've described?

    It does NOT. It CANNOT. Your 'solution' only handles a pure vanilla situation. That's a college...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    I think a separate judgeround table is a better design in this situation because it's more flexible.

    Say one judge is ailing and the others agree to give him/her a limited...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    You want to keep your judgeid as an INT, no need to use nvarchar for that.

    Except for long-term archiving, you only need one case table that has both current and...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    OFF-TOPIC

    My code returns the exact judges it should return and it will continue to do so for any list of possible inserts into the cases table that you can create.

    Don't...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How do I reload Judges table?

    No problem. I get that. The *first* thing you do for a case is check whether it qualifies as a transfer case. If it does, assign it...

    Scott Pletcher, SQL Server MVP 2008-2010

Viewing 15 posts - 241 through 255 (of 275 total)