Cursors
Posted: Tue Apr 10, 2007 5:46 am
Hi all,
I am facing one situation regarding PL/SQL
I an fetching two dates in a cursor like
cursor c1 is select iess.eventdate,
ss.insert_date,
s.shipment_gid
from ie_shipmentstatus,
status_history
shipment s
where iess.i_transaction_no = ss.trancastion.no
s.shipment_gid = ss.shipment_gid
the output of the cursor is as follows
eventdate insert_date shipment gid
25-dec-2006 11:59:20 25-dec-2006 11:20:20 1000
25-dec-2006 12:00:00 26-jan-2006 01:15:20 1000
26-jan-2007 1:35:25 26-jan-2007 01:45:25 1000
27-jan-2007 6:00:25 27-jan-2007 5:45:20 1001
27-jan-2007 6:00:00 27-jan-2007 7:00:20 1001
Here i want to compare 1st insert_date with 2nd eventdate
and 2nd insert_date with 3rd eventdate....etc for every shipment
I am facing one situation regarding PL/SQL
I an fetching two dates in a cursor like
cursor c1 is select iess.eventdate,
ss.insert_date,
s.shipment_gid
from ie_shipmentstatus,
status_history
shipment s
where iess.i_transaction_no = ss.trancastion.no
s.shipment_gid = ss.shipment_gid
the output of the cursor is as follows
eventdate insert_date shipment gid
25-dec-2006 11:59:20 25-dec-2006 11:20:20 1000
25-dec-2006 12:00:00 26-jan-2006 01:15:20 1000
26-jan-2007 1:35:25 26-jan-2007 01:45:25 1000
27-jan-2007 6:00:25 27-jan-2007 5:45:20 1001
27-jan-2007 6:00:00 27-jan-2007 7:00:20 1001
Here i want to compare 1st insert_date with 2nd eventdate
and 2nd insert_date with 3rd eventdate....etc for every shipment