Summarize multiple Column values into one row

  • I have a table

    Col1 Col2 Col3 Col4 Col5

    ----- ------ ------ ----- ------

    1 abc NULL NULL NULL

    1 NULL def NULL NULL

    1 NULL NULL ghi NULL

    1 NULL NULL NULL jkl

    I want:

    Col1 Col2 Col3 Col4 Col5

    ----- ------ ------ ----- ------

    1 abc def ghi jkl

    At first I thougt I could use pivot which I'm not sure how to do that but then I started doubting that. Any help would be great!

    Thanks~!

  • something like

    select col1,max(col2),max(col3)... from table

    group by col1


    Madhivanan

    Failing to plan is Planning to fail

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

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