The Blunder

  • + 2 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;