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 -> Calculating Total Time

Calculating Total Time

From: Scotty <scotty_at_imstressed.com>
Date: 29 Jul 2002 08:36:16 -0700
Message-ID: <a274d110.0207290736.1adbc42e@posting.google.com>


Hello all....

I need a little PL/SQL help.

I have at simple table

Timestamp           Asset       Status
2002-07-01 12:00    Pump 1      OPEN
2002-07-01  2:00    Pump 1      CLOSED
2002-07-01  3:30    Pump 1      OPEN
2002-07-01  3:45    Pump 1      CLOSED
2002-07-02 15:45    Pump 1      OPEN
2002-07-02 18:15    Pump 1      CLOSED

.
.
.

You get the idea.

I would like to calculate the total time Pump 1 was OPEN and total time Pump 1 was closed for a given starting time period and ending time period.

Is this what Time Series is good for? Or is there an straight PL/SQL algorithm I can use?

Thanks. Received on Mon Jul 29 2002 - 10:36:16 CDT

Original text of this message

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