I Have folowing Sql query in which i am using round function but it dont removes the demimal points after point.
Here is Query
SELECT animal_code, ROUND(SUM(calve_milk + evening + morning) / 31, 0) AS Expr1
FROM Status
WHERE (animal_code = 147) AND (m_date BETWEEN '1/1/2012' AND '1/31/2012')
GROUP BY animal_code
This Query Results
10.00000
And I want to get only 10 from this query.How can i do this in sql server 2005
Add a
CASTaround yourROUND.CAST(ROUND(SUM(calve_milk + evening + morning) / 31, 0) AS INT)