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 -> SQLPLUS QUESTION

SQLPLUS QUESTION

From: WILLIAM LUCOFF <BLUCOFF_at_EA.COM>
Date: 1997/12/10
Message-ID: <348EF442.7FD1@EA.COM>#1/1

This is a really dumb ( I am having a mental block as I am writting this code as an SQL*PLUS script).
here is the question:

I have a table

                      tbl_x
      col1        col2          date_col
       1            450   01/12/97:0100
       2              50   01/12/97:0100
       3                5   01/12/97:0100
       1             199  01/12/97:0200
       2             100  01/12/97:0200
       3                 5  01/12/97:0200

. . .
. . .
. . .

I nead to do a rollup the totals based on time

Namely ( Phesudo code)

   select sum(col2),date_col from tbl_x group by date_col

with the output looking like

    Sum(col2) Date_col

      505         01/12/97:0100
      304         01/12/97:0200
       .                  .
       .                  .

any thoughts on how I can accomplish this

thanks:

Received on Wed Dec 10 1997 - 00:00:00 CST

Original text of this message

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