PIVOT, is there a better way to do this?

  • ARPRINCE wrote:

    ScottPletcher wrote:

    Your query has some redundancy in it. You are selecting:

    Yes- thank you!

    I don't think ScottPletcher wrote that - lol

  • Jonathan AC Roberts wrote:

    ARPRINCE wrote:

    ScottPletcher wrote:

    Your query has some redundancy in it. You are selecting:

    Yes- thank you!

    I don't think ScottPletcher wrote that - lol

    I'm so sorry, my bad for the misquote- Thank you!

    Appreciate everyone's help as well!!!

    • This reply was modified 1 year, 10 months ago by  ARPRINCE. Reason: wrong word
  • ARPRINCE wrote:

    ScottPletcher wrote:

    ARPRINCE,

    Have you looked at the query plans for the two queries?  The LEFT JOIN method is doing a full table scan per join.  That could be a (big) performance issue, depending on the size of the original table.

    Yes agree, don't have a lot of records now. Thank you for your input!

    Famous last words. 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply