Forum Replies Created

Viewing 15 posts - 331 through 345 (of 532 total)

  • RE: Inner join help

    Rando (6/10/2010)


    Thanks. I'm not able to test this yet since they took our server down today and are migrating it to a different server.

    I've never seen SQL like that...

  • RE: How do I reload Judges table?

    scott.pletcher (6/10/2010)


    Why couldn't one judge have been there for, say, 60 years, and another judge for only 2 weeks? Wouldn't they have a different number of cases??

    Assuming there's only...

  • RE: How do I reload Judges table?

    scott.pletcher (6/10/2010)


    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...

  • RE: How do I reload Judges table?

    scott.pletcher (6/10/2010)


    Btw, frankly I think a separate table for the judges for rounds is much simpler, and vastly more accurate, than trying to add a lot of switches to the...

  • RE: How do I reload Judges table?

    #judges says the same but #cases is slightly different:

    create table #cases

    (

    CaseID INT IDENTITY PRIMARY...

  • RE: How do I reload Judges table?

    scott.pletcher (6/10/2010)


    . 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...

  • RE: Selecting the earliest month wrapping January to December

    scott.pletcher (6/10/2010)


    Did anyone even look at the code I posted that, to me, seems to get the answers desired??

    Yes it works with the sample data provided, but without specific rule...

  • RE: How do I reload Judges table?

    Personally I think it would be undesirable to use additional tables that you insert and delete judges from. Everything that you've explained that you want can be obtained from...

  • RE: How do I reload Judges table?

    Simply handle the TransferCase on your UI side. Your UI will run a query to see if an active judge has had the client in the last x period...

  • RE: How do I reload Judges table?

    I'm going to take this in a little different direction ...

    I've simplified the table structures to make it a bit more straight forward. I've also introduced an 'IsActive' field...

  • RE: Inner join help

    This returns the expected results from your first post:

    select prod.dtDate,

    comp.SF1,

    comp.SF2,

    comp.SF3,

    comp.SF4,

    comp.SF5,

    prod.Calls,

    prod.TIA,

    prod.NPP,

    prod.Breaks

    from

    (

    select dtDate,

    SUM(iCallsAnswered) as Calls,

    SUM(iTIASeconds) as TIA,

    SUM(iNPPSeconds) as NPP,

    SUM(iBreakSeconds) as Breaks

    from pt_ProdData

    group by dtDate

    ) prod

    join

    (

    select DateCompleted,

    sum(case when SubFunction_ID = 1 then...

  • RE: Inner join help

    Rando (6/9/2010)


    On The dbCreditData.dbo.tbl_pt_Completed table there are multiple records for each associate id on each day because they create a record for each SubFunction_ID.

    Your Breaks is the sum of your...

  • RE: Why there are so many connections?

    In asp.net you should be issuing a connection close for each time you have a connection open. The .net framework manages the connection pooling for you, but I'm pretty...

  • RE: Advice for getting First SQL Job

    If I was starting out right now, I would continue to try to find 'real DBA' type jobs, but at the same time I would spend a decent amount of...

  • RE: Stock Market Problem Using CTE

    I would like to help you but not enough information is included. What is the result set you are looking for? You refer to multiple 'scripts', but I'm...

Viewing 15 posts - 331 through 345 (of 532 total)