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

Home -> Community -> Usenet -> c.d.o.server -> Re: merging rows

Re: merging rows

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Wed, 20 Apr 2005 07:25:32 +0000 (UTC)
Message-ID: <d4505c$uft$1@klatschtante.init7.net>


> Hi All,
>
> What is the best way to merge some rows. Lets say I have three rows in
> a table and I want to replace them three with one row.
>
> Columns: A, B , C, D , E
>
> If Columns A, B and C are equal for rows then I want to merge those
> rows into one. I would use SUM on D and AVG on E.

I am not entierly sure if I understand what you mean. But I think you want something like
http://www.adp-gmbh.ch/ora/sql/user_def_agg.html (9i) or http://www.adp-gmbh.ch/blog/2005/march/28.html (10g).

hth
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Wed Apr 20 2005 - 02:25:32 CDT

Original text of this message

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