Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Location
    Nigeria
    Posts
    1

    Unanswered: i'm faced with this issue of being able to merge rows into a colomn

    hi,
    i'm faced with this issue of being able to merge rows into a colomn. The data is in this format:

    EMPLOYEE_NUMBER VERSION_NAME
    1000 Marketing and Selling Skills Course
    1000 Marketing & Selling First Bank Products Course
    1000 Developing Advance Marketing & Brand Building Skills Course
    2000 Customer Relationship Management : Strategy, Process Tech & People Course
    2000 Building and Retaining Customer Relationship Course
    2000 Branch Operations & Management Course
    2000 Marketing and Selling Skills Course
    2000 Customer Relationship Management : Strategy, Process Tech & People Course
    2000 Credit Risk Management Course
    2000 Business Marketing Course
    2000 Branch Foreign Operations Course
    2560 Branch Operations & Management Course
    2560 Basic Accounting
    2560 Branch Operations & Management Course
    2560 Securities Settlement, Clearing & Global Custody Course
    2560 Marketing & Selling First Bank Products Course
    7000 Relationship Management Course
    7000 Marketing and Selling Skills Course
    7000 Marketing and Selling Skills Course
    7000 Relationship Management Course



    I'd like to generate a report that will make the colomn 'EMPLOYEE_NUMBER' unique.That's each numbers standing distinctly while colomn 'VERSION_NAME' will be merged seperating each data in 'VERSION_NAME' identified by 'EMPLOYEE_NUMBER' with a comma ','.

    This should look like this:

    EMPLOYEE_NUMBER VERSION_NAME
    1000 Marketing and Selling Skills Course
    Marketing & Selling First Bank Products Course
    Developing Advance Marketing & Brand Building Skills Course
    2000 Customer Relationship Management : Strategy, Process Tech & People Course,
    Building and Retaining Customer Relationship Course,
    Branch Operations & Management Course,
    Marketing and Selling Skills Course,
    Customer Relationship Management : Strategy, Process Tech & People Course,
    Credit Risk Management Course,
    Business Marketing Course,
    Branch Foreign Operations Course,
    2560 Branch Operations & Management Course,
    Basic Accounting,
    Branch Operations & Management Course,
    Securities Settlement, Clearing & Global Custody Course,
    Marketing & Selling First Bank Products Course,
    7000 Relationship Management Course,
    Marketing and Selling Skills Course,
    Marketing and Selling Skills Course,
    Relationship Management Course,


    Please I need your help on this.


    Monday Gabriel
    Last edited by mondaygabriel; 07-24-09 at 17:59.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    http://www.dbforums.com/query.php?do...RID%3A11&hl=en

    search this forum for "PIVOT QUERY"
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    You could also use the built in string aggregation function wm_concat(). But you'll have to handle the existing commas in version_name.

    Oracle WM Functions and Operators

Posting Permissions

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