How to horizontally show columns record with group by (Challengin SQL Query To Write,At Least For Me))?

  • Table A:

    ColAColB
    AJohn
    ABill
    BHenry
    CKeith
    CLuke
    CPeter

    Table B:

    ColAColB
    AJohn, Bill
    BHenry
    CKeith, Luke, Peter

    I wan to write a query (without looping/cursor if possible) that can extract data from Table A and return resultset as Table B. Anyone who has done something similar before? i wanted to use COALESCE syntax, but no idea how to do it in this situation... Any suggestion will be much appreciated. Thankq.

  • See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254

     


    N 56°04'39.16"
    E 12°55'05.25"

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

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