[cx-oracle-users] calculate time differences on timestamp column
Brought to you by:
atuining
From: <prz...@po...> - 2011-07-06 12:22:25
|
Hello, I have a table with one timestamp column: ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER(10) DOC NOT NULL NUMBER(10) TIME NOT NULL TIMESTAMP(6) TYPE_OF_OPER NOT NULL VARCHAR2(1) SIZE NUMBER(10) DESC VARCHAR2(200) When I select from this table (just two columns) TIME TYPE_OF_OPER --------------------------------------------------------------------------- - 11/07/06 13:03:45,826773 D 11/07/06 13:03:45,848394 E 11/07/06 13:03:46,978210 F 11/07/06 13:07:48,053144 A 11/07/06 13:07:48,072237 B 11/07/06 13:07:48,444520 C 11/07/06 13:07:48,504301 D 11/07/06 13:07:48,532285 E 11/07/06 13:07:49,504860 F 11/07/06 13:07:50,554859 A ... (over 10000 rows) Our developer records timestamps in important part of his application: code A ... record timestampt 'A' code B ... record timestampt 'B' code C ... record timestampt 'C' code D ... (there are only 'A'-'F' timestamps). What I'd like to achive is to get delta time between 'A' and 'B' (= time of code 'B') but for all 'A' and 'B' (as an output I get rows of numbers). How can I calculate this using cx-oracle ? Regards Przemyslaw Bak (przemol) ---------------------------------------------------------------- Znajdz samochod idealny dla siebie! Szukaj >> http://linkint.pl/f29e2 |