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 -> What about other way from 1 row to 24 rows?? Re: how do I combine

What about other way from 1 row to 24 rows?? Re: how do I combine

From: jose <jose_at_aol.com>
Date: 20 Feb 1999 13:06:50 -0600
Message-ID: <7vzz2.61459$O54.83739@newscene.newscene.com>


In article <19990219192918.06071.00000175_at_ngol08.aol.com>, mstout2468_at_aol.com (MStout2468) wrote:
>
>Hi,
>
> select name,date
>sum(decode(rownum,1,hour,0) hour1
>sum(decode(rownum,2,hour,0) hour2
>sum(decode(rownum,3,hour,0) hour3
>sum(decode(rownum,4,hour,0) hour4
>sum(decode(rownum,5,hour,0) hour5
>sum(decode(rownum,6,hour,0) hour6
>sum(decode(rownum,7,hour,0) hour7
>sum(decode(rownum,8,hour,0) hour8
>sum(decode(rownum,9,hour,0) hour9
>sum(decode(rownum,10,hour,0) hour10
>sum(decode(rownum,11,hour,0) hour11
>sum(decode(rownum,12,hour,0) hour12
>sum(decode(rownum,13,hour,0) hour13
>sum(decode(rownum,14,hour,0) hour14
>sum(decode(rownum,15,hour,0) hour15
>sum(decode(rownum,16,hour,0) hour16
>sum(decode(rownum,17,hour,0) hour17
>sum(decode(rownum,18,hour,0) hour18
>sum(decode(rownum,19,hour,0) hour19
>sum(decode(rownum,20,hour,0) hour20
>sum(decode(rownum,21,hour,0) hour21
>sum(decode(rownum,22,hour,0) hour22
>sum(decode(rownum,23,hour,0) hour23
>sum(decode(rownum,24,hour,0) hour24
>from <table>
>group by name,date
>
>
>rownum really is not a good thing to use. The table
>really needs a column to sequence the rows.
>
>Mike Stout
Received on Sat Feb 20 1999 - 13:06:50 CST

Original text of this message

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