The Blunder

  • + 0 comments

    Why this doesnt work: SELECT CEILING( AVG(Salary) - AVG(CASE WHEN REPLACE(CAST(Salary AS VARCHAR), '0', '') = '' THEN 0 ELSE CAST(REPLACE(CAST(Salary AS VARCHAR), '0', '') as bigint) END) ) AS ErrorAmount FROM EMPLOYEES