Help - Search - Members - Calendar
Full Version: grouping in sql
Oracle DBA Forums > Oracle > Oracle Forum
gutopmc
Hello, Im trying to list the products list of a client grouped by type of the product. Ex:

product type

prod.A acid
prod.B flavour
prod.C acid
prod.D cleaner
prod.E flavour

I want to list something as:

Acid

Prod.A
Prod.C

Cleaner

prod.D

Flavour

prod.B
prod.E

Is it possible?
burleson
Hi Guto,

>> Im trying to list the products list of a client grouped by type of the product.

Sure!

It looks like you want to pivot multiple row values onto a single column, right?

http://www.dba-oracle.com/t_converting_rows_columns.htm

If you want more working examples, get the code download from the book "Advanced SQL Programming":

http://www.rampant-books.com/book_0802_adv...programming.htm

Good Luck!

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.