Query for distinct values as single row
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Query for distinct values as single row

  1. #1
    Join Date
    Sep 2000
    Posts
    77

    Query for distinct values as single row

    I have table with 2 columns and 4 rows. colA is unique. ColB values are same for each of 2 rows.
    Here is the actual data in table

    ColA ColB
    -----------------------
    1 PRODUCT
    2 PRODUCT
    3 PRICE
    4 PRICE

    I am trying to get output from a single query as below.

    1,2 -- PRODUCT
    3,4 -- PRICE

    Can someone please advise how to write this query.
    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    search the forum for "pivot"
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

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



Click Here to Expand Forum to Full Width