Query Question

C

carl

My database looks like this:

ID Time Date Code
1 93116 20060403 UMUD06C30.00
2 93137 20060403 QAAE06C65.00
3 93141 20060403 QAAE06C65.00
4 93150 20060403 DLQD06C30.00

Is it possible for a query to do the following:

Result TimeDiff Time1 ID Time Date Code
Keep 9:31:16 1 93116 20060403 UMUD06C30.00
Keep 0:00:21 9:31:37 2 93137 20060403 QAAE06C65.00
FilterOut 0:00:04 9:31:41 3 93141 20060403 QAAE06C65.00
Keep 0:00:09 9:31:50 4 93150 20060403 DLQD06C30.00


Basically filter out Record 3 based on the logic: If Record "N" Code is the
same as Record "N+1" Code and the difference between Record N+1 Time and
Record N Time is less than 5 seconds.

I think the quesry needs to reformat my Time data as well (Time1 Field)
although it is not necessary for Time1 to be displayed in the query result.

Thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query Question 0
Sorting Question 5
Query That Compares 2 Adjacement Records 1
Comparing 2 Adjacent Records 0
IF AND Question 1
Query Help Again 2
querying unrelated tables 7
Time questions with partition 9

Top