By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

calculation with msaccess

P: n/a
Hi,

I have a msaccess database with more then 50 tables. Each table exist of the
history off a specific truck data and excist of a honderd records in each
table.
(deparute date, arrival date, destination etc.). I want to calculate from
the last 5 records in each table the averge between the arrival and
desination dates.
How can this be done

Thanks anyway
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Br
Joost <no****@home.nl> wrote:
Hi,

I have a msaccess database with more then 50 tables.
Why seperate tables when you are storing the same info?
Each table exist
of the history off a specific truck data and excist of a honderd
records in each table.
(deparute date, arrival date, destination etc.). I want to calculate
from the last 5 records in each table the averge between the arrival
and desination dates.
How can this be done

Thanks anyway


Something like...

SELECT Avg([Difference]) AS AvgDays
FROM
(SELECT TOP 5 DateDiff("d",[Departure],[Arrival]) AS Difference FROM
tblTruck);

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.