Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Unanswered: One select statement to do this

    Hi there,

    I just want to know if it's possible to writing a select statement in DB2 to do the following.

    From this result to

    CAT DESC
    ---- -------
    1 APPLE
    1 PEAR
    1 PEACH

    this result

    CAT DESC1 DESC2 DESC3
    ---- ------ ------ -------
    1 APPLE PEAR PEACH

    if not, how would I achieve this task?

    TIA,
    Steve

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Yes, search this forum for Pivot table, or listagg. This question gets asked almost monthly. A simple search should get you what you want.

    Andy

Tags for this Thread

Posting Permissions

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