5 Replies Latest reply: Aug 1, 2013 7:33 PM by SomeoneElse RSS

    Select Column Value with comma

    G.Y

      Dear All

      I want to select/take out put of one id phone numbers in one column seprated by comma.

      this is my table data script:

       

      SELECT P.PH_NUMBER,P.ID_NO
      FROM BARTER.AGENT_PHONE P 
      ORDER BY TO_NUMBER(SUBSTR(P.ID_NO,2)) ASC;
      

       

      Data out put

      Phone NumberID_No
      92412045099A10
      96894362712A10
      923217603674A10
      0096896709595A11
      99741854A13
      94362712A18
      94362712C20
      96492020C20

       

      I want the above output as:

       

      Phone NumberID_No
      92412045099,96894362712,923217603674A10
      0096896709595A11
      99741854A13
      94362712A18
      94362712, 96492020C20

       

      Please guide me how to write code.

       

      thanks

      yassen.