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 -> Re: Combining column values across rows

Re: Combining column values across rows

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 9 Aug 2001 18:00:36 +0100
Message-ID: <3b72c1b9$0$8513$ed9e5944@reading.news.pipex.net>

  1. for your specific enquiry there wasa neat answer on this given just a short while a\go on this group it should be findable thru google.
  2. No views take up no space in the database worth caring about.
--
Niall Litchfield
Oracle DBA
Audit Commission UK

Legal disclaimer required by my employer
****************************************************************************
**
This email contains information intended for the addressee only.
 It may be confidential and may be the subject of legal and/or professional
privilege.
Any dissemination, distribution, copyright or use of this communication
without prior permission of the addressee is strictly prohibited.
****************************************************************************
**
"Maky" <maky_at_lemur.org.uk> wrote in message
news:tn55ltbl00t8c2_at_xo.supernews.co.uk...

> Hi,
>
> I hope someone here can help me - I know very little about Oracle or SQL,
but
> have found myself involved in a project where no one else knows anything
about
> it either. =/
>
> The problem is that we have a product table which has a many-to-many
relation
> to a category table (joined through a third "parent" table):
>
> [product] ---< [parent] >--- [category]
>
> We want to get a view where each product occupies just one row, and any
multiple
> category values are combined into a single value, eg (concatenating with
commas):
>
> Product Category
> -------------------
> cheese dairy
> cheese solid
> milk dairy
> milk liquid
> beer liquid
>
> will become
>
> Product Category
> -------------------
> cheese dairy, solid
> milk dairy, liquid
> beer liquid
>
> (This is to make it easier to feed to an Inktomi full-text indexer.)
>
> Is there any way to do this, preferably in SQL?
>
> Also, am I right in thinking that creating a view does not take up any
significant storage
> space in the database?
>
> Thanks for any help,
> Maky
>
>
>
Received on Thu Aug 09 2001 - 12:00:36 CDT

Original text of this message

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