concatenation of rows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kranti116
    New Member
    • Oct 2008
    • 2

    concatenation of rows

    I have the following table contents:
    ID kEYWORD
    -------- ----------------------
    1 AB
    1 AC
    1 AD
    2 XX
    2 YYY


    I need to convert this to the following output:

    ID kEYWORD
    -------- ----------------------
    1 AB,AC,AD
    2 XX,YYY


    How can I do this?
    I don't like to use procedures, functions or any anonymous blocks
    it should be a simple statement starting with select
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You need to use DECODE for all that.

    Comment

    • kranti116
      New Member
      • Oct 2008
      • 2

      #3
      Originally posted by debasisdas
      You need to use DECODE for all that.
      can u frame the exact query with decode

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Please try and post back inc ase of any issues

        Comment

        Working...