Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    73

    Question Unanswered: Concatenate rows as columns ?

    How can I select rows from a table into single column separated by commas ?
    ID Name
    --- ------
    1 Henry
    2 Ford
    3 John

    to

    1,2,3 Heny,Ford,John

    I am using DB2 ISeries V5 R4.

  2. #2
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    Check on recursive SQL.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •