I am trying to create a sql query where I subtract one date from another.
examples of the data are:
occnt segname date
2 OUTSER 08/09/02 06:18
3 REMINQ 08/09/02 06:32
8 OUTSER 09/21/02 08:06
9 LOGOFF 09/21/02 08:14
11 OUTSER 10/10/02 21:51
12 CLEAR 10/10/02 21:52
What I am trying to do is subtract the OUTSER date from the segmentname right after it. As you can see from the data, the segment name after the OUTSER can be different in each case.
Any help would be appreciated. Thanks
examples of the data are:
occnt segname date
2 OUTSER 08/09/02 06:18
3 REMINQ 08/09/02 06:32
8 OUTSER 09/21/02 08:06
9 LOGOFF 09/21/02 08:14
11 OUTSER 10/10/02 21:51
12 CLEAR 10/10/02 21:52
What I am trying to do is subtract the OUTSER date from the segmentname right after it. As you can see from the data, the segment name after the OUTSER can be different in each case.
Any help would be appreciated. Thanks