Page 1 of 1

[solved] AVG() in mssql vs AVG() in mysql

Posted: Thu Jul 08, 2004 11:37 am
by waskelton4
I've just converted a mysql DB to mssql and use the AVG aggregate function on a field..

where mysql would give me results using AVG on a text field..
msql requires a numeric field type...

problem is.. i'm storing text and numeric data in this field..
i'm only averaging the numeric data.. but it still needs to have text data in there

anyone know of an alternate field type or will i have to write lots of code to fix this.. or redesign my database .. (eeek)

any help is greatly apprecitated..

Thanks
ws

Posted: Thu Jul 08, 2004 11:49 am
by waskelton4
for anyone interested... this article handles my exact problem..

http://www.winnetmag.com/SQLServer/Arti ... 26968.html

hope it helps others


ws