Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

avg calculation

Status
Not open for further replies.

dumdum2

Programmer
Mar 18, 2000
98
0
0
GB
I have a table of records, some with an age, some where age is blank. I'd like to get the average age of all the records combined, and I would usually export to Excel and do the formula in Excel. But I'd like to figure how to get Access 2000 to do it for me......

Thanks!
 
Something like this (SQL code) ?
SELECT Avg([age field]) AS averageAge
FROM yourTable

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Just
Code:
Select AVG([Age]) As [Average Age], ...

From myTable
Which will ignore those records where Age is NULL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top