Removing redundant rows

  •  

    I have a table in the below mentioned format:

    COL1    COL2    COL3   COL4

    A         4          0        0

    B         5          0        0

    A         0          4        0

    C         1          0        0

    A         0          0        5

    B         0          7        0

    And I want the ouput in:

    COL1    COL2    COL3   COL4

    A         4          4        5

    B         5          7        0

    C         1          0        0

     

    Can anybody help me with the SQL query to get such an output????

  • Ankit

    No need to post the same question more than once, please.  Answered here:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=120&messageid=340005

    John

Viewing 2 posts - 1 through 2 (of 2 total)

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