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 -> Consolidation of specific rows retaining another ones unaltered

Consolidation of specific rows retaining another ones unaltered

From: Sameer <dolpheen_at_gmail.com>
Date: 22 Oct 2006 23:06:22 -0700
Message-ID: <1161583581.942641.306680@k70g2000cwa.googlegroups.com>


Dear All,
Please have a look at this Google document. http://docs.google.com/View?docid=ddqx8p3w_1c2szdk I want to consolidate 3 rows (SAS-AP, SAS-AR, SAS-GL) into 1 row SAS by summing them columnwise and retaining sum into SAS row.

One probable way is to group by using substr function on first three characters.

SELECT togroup, sum(master), sum(TRANSACTIONs), sum(reports), sum(miscallaneous)FROM (SELECT mr_issues_typewise.*, SUBSTR(MODULE, 1, 3) AS togroup FROM mr_issues_typewise)GROUP BY togroup

But this will also group INT- rows which I do not expect. Also I want to have module names in the output.

How to do this? Please help.

-Sameer Received on Mon Oct 23 2006 - 01:06:22 CDT

Original text of this message

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