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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting average of columns

Status
Not open for further replies.

sdpsc

Technical User
Feb 10, 2001
76
I have a table in Access with columns 'm' and 'j', and I need to run a query to put the average of those two columns in another columns. Here is what I tried:

update table set average =(m+j)/2;

This, however, completely cuts off the decimals, even though the 'average' column is set for 3 decimals. How do I get this to work correctly (or is there a better way to do this)? Thanks!
 
What are the type and the field size of the average column ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It is a number type, long integer.
 
Long integer hold only integral parts of number.
Choose either Single or Double.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That was it! Thanks PHV!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top