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

field type... get avg() ...of an access text field

Status
Not open for further replies.

TRYP

Programmer
Jun 20, 2000
136
US
i have an access DB that has a text column of "integers" how can i use the avg function or average them with out individually convertiong the values??? any ideas [sig][/sig]
 
select avg(fieldname) from tablename

or do I misunderstand the dilema


[sig][/sig]
 
mva...

all the text is whole numbers, but the data type is text.
(string)
i want to get avg() of the columns but i want to avoid having to select the columns and loop through them to convert them using cint() any ideas?
tryp [sig][/sig]
 
???

select avg(cint(fieldname)) from tablename

???

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
tried the cint() inside of avg() no go but i did find the answer avg(val(fieldName)) !

Thanks all. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top