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

Home -> Community -> Usenet -> c.d.o.misc -> SQL-Question: Transformation of a column

SQL-Question: Transformation of a column

From: Olaf Musch <Olaf.Musch_at_computer.org>
Date: Mon, 3 Nov 2003 17:09:56 +0100
Message-ID: <bo5uk9$184e7n$1@ID-168133.news.uni-berlin.de>


Hi,

in a multi-company database (Oracle 9i Release 2, Enterprise Edition), we've got some statistical views telling us the relevant numbers in the following form:

name      period    value
company1  2003-7      x1
company1  2003-8      x2
company2  2003-7      x3

...

What our management now would like to see is the following:

name       2003-7   2003-8  ...   Total
company1     x1        x2         x1+x2
company2     x3                   x3

Other than to export the results and make a Pivot-Table in Excel, we currently don't see a solution.

Is there a statement variation to solve this?

Thanks in advance

Olaf Received on Mon Nov 03 2003 - 10:09:56 CST

Original text of this message

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