Hi,
I want to get the difference between two times, the data is like this:
Id StarTime EndTime
1 11:55:27.945 null
2 11:55:34.765 12:55:57.766
3 12:56:19.047 14:59:29.703
4 00:03:30.842 null
5 02:20:44.165 15:08:32.579
6 15:25:58.247 16:35:13.895
what i want is to get a 4 column TOTAL like:
Id TOTAL
1 (blank , because EndTime is null)
2 01:00
3 02:03
4 (blank , because EndTime is null)
5 12:48
6 01:10
I'm using Sybase SQL Anywhere 5.5
Columns StarTime and EndTime are TIME
Is there a way of doing this in a single SELECT.
Any help will be appreciate.
Thanks,
David.
P.S. I'm new in Tek-Tips, should I post this here or in another forum.
I want to get the difference between two times, the data is like this:
Id StarTime EndTime
1 11:55:27.945 null
2 11:55:34.765 12:55:57.766
3 12:56:19.047 14:59:29.703
4 00:03:30.842 null
5 02:20:44.165 15:08:32.579
6 15:25:58.247 16:35:13.895
what i want is to get a 4 column TOTAL like:
Id TOTAL
1 (blank , because EndTime is null)
2 01:00
3 02:03
4 (blank , because EndTime is null)
5 12:48
6 01:10
I'm using Sybase SQL Anywhere 5.5
Columns StarTime and EndTime are TIME
Is there a way of doing this in a single SELECT.
Any help will be appreciate.
Thanks,
David.
P.S. I'm new in Tek-Tips, should I post this here or in another forum.