Forum Replies Created

Viewing 11 posts - 1 through 12 (of 12 total)

  • RE: Help with a tricky query

    GSquared (3/4/2011)


    ColdCoffee (3/3/2011)


    Lol :w00t: !! my nickname is derived from a bitter experience by drinkng ColdCoffee, but that led to the formation of a set of close friends for me;...

  • RE: Help with a tricky query

    Craig Farrell (3/3/2011)


    GSquared (3/3/2011)


    lee rite (3/3/2011)


    ColdCoffee (3/3/2011)


    lee rite (3/3/2011)


    Thanks again! I think I'm done! I really appreciate all the help!

    Will i be getting a Samsung Focus for this help ,...

  • RE: Help with a tricky query

    ColdCoffee (3/3/2011)


    lee rite (3/3/2011)


    Thanks again! I think I'm done! I really appreciate all the help!

    Will i be getting a Samsung Focus for this help , mate ?? :hehe:

    I will probably...

  • RE: Help with a tricky query

    ColdCoffee (3/3/2011)


    lee rite (3/3/2011)


    lee rite (3/3/2011)


    ColdCoffee (3/3/2011)


    SELECT GUID

    FROM #T

    GROUP BY GUID

    HAVING COUNT( DISTINCT CompanyName) = 1

    Thanks ColdCoffee! I think you nailed it. Your query selects all companies that...

  • RE: Help with a tricky query

    lee rite (3/3/2011)


    ColdCoffee (3/3/2011)


    SELECT GUID

    FROM #T

    GROUP BY GUID

    HAVING COUNT( DISTINCT CompanyName) = 1

    Thanks ColdCoffee! I think you nailed it. Your query selects all companies that never changed their...

  • RE: Help with a tricky query

    ColdCoffee (3/3/2011)


    SELECT GUID

    FROM #T

    GROUP BY GUID

    HAVING COUNT( DISTINCT CompanyName) = 1

    Thanks ColdCoffee! I think you nailed it. Your query selects all companies that never changed their name. I...

  • RE: Help with a tricky query

    GSquared (3/3/2011)


    lee rite (3/3/2011)


    Craig Farrell (3/3/2011)


    lee rite (3/3/2011)


    Thanks for your help, guys! There are actually 25 columns, not 3.

    Let me explain exactly what I'm working with, so you will...

  • RE: Help with a tricky query

    ColdCoffee (3/3/2011)


    Try this:

    SELECT ID

    FROM

    ( SELECT * FROM #T ) PIVOT_TABLE

    UNPIVOT

    (

    Vals FOR ColNames IN ([2008],[2009],[2010])

    ) PIVOT_HANDLE

    GROUP BY ID

    HAVING ...

  • RE: Help with a tricky query

    Craig Farrell (3/3/2011)


    lee rite (3/3/2011)


    Thanks for your help, guys! There are actually 25 columns, not 3.

    Let me explain exactly what I'm working with, so you will see why I...

  • RE: Help with a tricky query

    About 5,000....

  • RE: Help with a tricky query

    GSquared (3/3/2011)


    CREATE TABLE #T (

    ID INT IDENTITY

    PRIMARY KEY,

    [2008] INT,

    ...

Viewing 11 posts - 1 through 12 (of 12 total)