Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> SQL selection

SQL selection

From: <martincat_at_my-deja.com>
Date: 2000/05/03
Message-ID: <8eq1g4$q45$1@nnrp1.deja.com>#1/1

Say we have a database (oracle) with a this table that has two columns ITEM and TYPE where ITEM is one and TYPE can be many.

ITEM	TYPE
FRUIT	APPLE
FRUIT	ORANGE
FRUIT 	PEAR
FRUIT	PEACH
VEG	CARROT
VEG	PEA
VEG	POTATO
MINERAL	SALT
MINERAL	IRON
MINERAL	COPPER
MINERAL	ZINC
PLANET	VENUS
PLANET	SATURN
STAR	SUN

What I would like to do is to make a select that displays the data as follows:
With the ITEM appearing on one line followed on the same line by each of the related TYPES. Note that the number of TYPES is variable and they do not need to appear in any special order.

FRUIT	APPLE	ORANGE	PEAR	PEACH
VEG	CARROT	PEA	POTATO
MINERAL	SALT	IRON	COPPER	ZINC
PLANET	VENUS	SATURN
STAR	SUN

What would be the most effective method to perform this?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed May 03 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US