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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: CROSS TAB QUERY (long)

Re: CROSS TAB QUERY (long)

From: Dias Costa <dcosta_at_lnec.pt>
Date: Wed, 28 Nov 2001 02:54:14 -0800
Message-ID: <F001.003CEA64.20011128024027@fatcity.com>

Hi !

May this complete example can help you:


If you neeed some more help, I'll be glad to help You.

Bye
Dias Costa

Moses Ngati Moya wrote:

> 
> 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).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Dias Costa
  INET: dcosta_at_lnec.pt
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 - 04:54:14 CST

Original text of this message

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