Home All Groups Group Topic Archive Search About

Combine records to calculate

Author
29 Mar 2007 4:17 PM
David S.
I have a table that contains arrival times for different vehicles. I would
like to be able to combine records by incident and calculate the difference
in time of thier arrival.

Example

incd    vehi    time
123    m03    12:04
123    e05    12:07
124    m02    14:09
124    e07    14:06

This is what I want to do.

incd    vehi1    vehi2    time    diff
123    m03    e05        12:04    :03
124    m02    e07        14:09    -:03

Notice that I want to always use the "m" vehicles as the primary and
calculate the difference in time of that even if it results in a negative
time, meaning they were not the first to arrive.

Can anyone help me?

ds

AddThis Social Bookmark Button