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

Home -> Community -> Mailing Lists -> Oracle-L -> CROSS TAB QUERY

CROSS TAB QUERY

From: Moses Ngati Moya <moyam_at_mtn.co.ug>
Date: Wed, 28 Nov 2001 01:05:06 -0800
Message-ID: <F001.003CE82A.20011128001522@fatcity.com>

Hi Gurus,

I have a table Monthly_Stats as below:

MONTH VARCHAR2(20),
ERLANG NUMBER(7,2)
CONG NUMBER(5,2)
.
.

CSETUP NUMBER(5,2) A record is inserted in this table every end of month.

I would like to write an SQL query to produce output below:

                        
                                MONTH
                JAN     FEB     MAR     APR     MAY     .       .       .
DEC
                
ERLANG  777     999     98      66      87                              999
CONG            9       6       3       4       2
4
CSETUP
.
.
.

I do not know the number of months in advance, i.e. if the table has 3 months (JAN, FEB, MAR), these are the only months I need in the report.

Any suggestions??

Moses Moya Ngati

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Moses Ngati Moya
  INET: moyam_at_mtn.co.ug

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Nov 28 2001 - 03:05:06 CST

Original text of this message

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