Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using Average with char fields

Former Member
0 Likes
667

Greetings,

I created a report  and I want to get the average for some database fields .

The type of these fields is char .How can I get the average?

Thanks and regards,

Noor Asd

3 REPLIES 3
Read only

Former Member
0 Likes
628

Hi,

Well, one way would be to leave the aggregate function on your SELECT statement and calculate the average value yourself within a loop...

Cheers,

Manu.

Read only

Former Member
0 Likes
628

since average is based on a numerical value, you're not doing to do it with char fields.

Read only

Former Member
0 Likes
628

Hi,

You have to move the values into a numerical variable before trying to average it.

Regards,

Karl