Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Loribrooks36
Starting Member
1 Post |
Posted - 2012-11-21 : 15:35:34
|
I need to calculate an average of values in one field. I used the correct syntax 'Select AVG(fieldname) etc. '. However, it does not work. Is there any limitations in terms of how the database should have the information organized in order for me to be able to return the Average of values. |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-11-21 : 15:37:37
|
Show us your query |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-11-25 : 09:37:37
|
quote: Originally posted by Loribrooks36 I need to calculate an average of values in one field. I used the correct syntax 'Select AVG(fieldname) etc. '. However, it does not work. Is there any limitations in terms of how the database should have the information organized in order for me to be able to return the Average of values.
whats the datatype of field used inside AVG? it may be that it was integer field so that result got implicitly converted to inttry AVG(field * 1.0) instead of AVG(field) and see if it gives you correct result------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|