1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transform Data from Multiple rows in a Single Row

Discussion in 'Oracle' started by nimesh, Apr 27, 2009.

  1. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    770
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    I've a situation where I'm retreiving the data in a subquery, the result for which can be multiple rows and columns.

    And I want the result for this sub-query to appear in a single row for the parent query.

    E.g. The Result from Subquery
    No. - Name
    1 - Google
    2 - Yahoo
    3 - MSN

    The transformation for the parent query
    List of Names
    1 - Google, 2 - Yahoo, 3 - MSN

    Can anyone help me on achieving this?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,293
    Likes Received:
    365
    Trophy Points:
    83
    Why do you need in single line in the parent query because normally queries are always in result set
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
  4. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    770
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    I know it won't make much sense but the data from subquery can go from 0 to 50 records for each parent query, so to keep it simple and understandable, I want it this way.

    Thanks xpi0t0s for reminding about AskTom and giving the correct thread link.
     
  5. sudhagar

    sudhagar New Member

    Joined:
    Apr 6, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    Chennai
    Query result always will be displayed row by row..
    bcz database created like this..it will be understood by every one..
     

Share This Page