I have a date/time field in a table and I need to be able to find out if there is a gap between any of the records grouped by the Code field.
Sample data:
ID Code Time
1 1234 5/12/04 4:32:32
2 1234 5/12/04 4:34:19
3 1234 5/12/04 4:59:00
4 5678 5/12/04 1:00:00
5 5678 5/12/04 1:29:00
6 5678 5/12/04 1:59:59
7 9012 5/12/04 2:00:00
8 3456 5/12/04 2:00:00
9 3456 5/12/04 2:29:00
What I need to be able to show is that there is a gap of more than 30 minutes between record 5 and 6.
What is the best way to go about doing this in a query?
Sample data:
ID Code Time
1 1234 5/12/04 4:32:32
2 1234 5/12/04 4:34:19
3 1234 5/12/04 4:59:00
4 5678 5/12/04 1:00:00
5 5678 5/12/04 1:29:00
6 5678 5/12/04 1:59:59
7 9012 5/12/04 2:00:00
8 3456 5/12/04 2:00:00
9 3456 5/12/04 2:29:00
What I need to be able to show is that there is a gap of more than 30 minutes between record 5 and 6.
What is the best way to go about doing this in a query?