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

Home -> Community -> Usenet -> c.d.o.misc -> Compare current and next row data

Compare current and next row data

From: <me_at_csgoh.com>
Date: 2 Jun 2005 01:05:31 -0700
Message-ID: <1117699531.304670.88710@g44g2000cwa.googlegroups.com>


Hi!

Is there a way to compare data from two row (current and next row) of data in Oracle by just one SQL statement?

I have a table looks like this

f1                  f2
------------------- ----

2005 06 01 14:30:00 100
2005 06 01 14:37:21 120

How can I compare the time differences betwen 1st and 2nd rows by just using one SQL statement.

Appreciate you help. Thanks

Bob Received on Thu Jun 02 2005 - 03:05:31 CDT

Original text of this message

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