You are viewing a single comment's thread. Return to all comments →
in mssql convert is used to convert the value to int but yet the last digit is 2 instead of 3 inspite of using the ceiling function.
this is my code:
select ceiling(avg(salary))-ceiling(avg(convert(int,replace(salary,0,"")))) from employees;
Seems like cookies are disabled on this browser, please enable them to open this website
The Blunder
You are viewing a single comment's thread. Return to all comments →
in mssql convert is used to convert the value to int but yet the last digit is 2 instead of 3 inspite of using the ceiling function.
this is my code:
select ceiling(avg(salary))-ceiling(avg(convert(int,replace(salary,0,"")))) from employees;