View Single Post
 
Old January 7th, 2011, 06:52 AM
moonkhan253
Guest
 
Posts: n/a
Default How to subtract hours from sysdate in oracle

There are no SQL functions that works on the current row and the previous or next row. The functions work across all rows.

What you'll need to do is write a PL/SQL procedure or function or anonymous block, where your select statement is a cursor, and process the rows of the cursor, using extra variables to hold the previous row's data to use for comparing against the current row.
____________________
fun | mobile | free download | world call