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: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 20 Apr 2005 08:47:37 -0700
Message-ID: <1114011824.117735@yasure>


vissuyk_at_yahoo.com wrote:

> 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.
>
> Any suggestions are appreciated
>
> Vissu

Replace doesn't exist but the creation of the new row might, potentially, be accomplished using the MODEL clause new to 10gR1.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Apr 20 2005 - 10:47:37 CDT

Original text of this message

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