title: Show Only 2 Decimal Places in SQL Server
body: <p>I've got some columns that are stored as an INT value that I am doing some addition and division on and I would like to display the results by limiting the digits after the decimal to 2.  I've tried different combinations of DECIMAL / NUMERIC / ROUND but I can't get the solution.</p>
  
  <p>Could anyone offer any advice on how to get the desired solution?</p>
  
  <p>Query:</p>
  
  <pre><code>SELECT cc.code AS [CountyID], RTRIM(LTRIM(cc.[description])) AS [CountyName],
  SUM(ISNULL(ps.push_count,0)) AS [CountyPushCounts],
  SUM(ISNULL(ps.push_unique_count,0)) AS [UniquePushCount],
  SUM(ISNULL(ps.error_count,0)) AS [PushErrorCount],
  SUM(ISNULL(ps.warning_count,0)) AS [PushWarningCount],
  
  (CAST(SUM(ISNULL(ps.push_unique_count,0)) AS DECIMAL(15,2)) / CAST(SUM(ISNULL(ps.push_count,0)) AS DECIMAL(15,2)) * 100.0) AS [Unique Push Per Day] ,
  
  ((CAST(SUM(ISNULL(ps.error_count,0)) AS DECIMAL(15,2)) + CAST(SUM(ISNULL(ps.warning_count,0)) AS DECIMAL(15,2))) / CAST(SUM(ISNULL(ps.push_count,0)) AS DECIMAL(15,2)) * 100.0) AS [Data Error Rate]
  
  FROM dbo.push_stats AS [ps]
  INNER JOIN CCIS.dbo.county_codes AS [cc] ON ps.county_code = cc.code
  WHERE DATEPART(YEAR,ps.ldstat_date) = 2017
  AND DATEPART(MONTH,ps.ldstat_date) = 3
  GROUP BY cc.code, cc.[description]
  ORDER BY cc.[description];
  </code></pre>
  
  <p>And my data set looks as follows:</p>
  
  <pre><code>CountyID  CountyName  PushCounts  UniquePushCount  PushErrorCount  PushWarningCount  [Unique Push Per Day]  [Data Error Rate]
  1         ALACHUA     210422      77046            0               39                36.61499273            0.018534184
  2         BAKER       8099        5306             0               71                65.51426102            0.876651438
  3         BAY         3178214     434893           117             2793              13.68356568            0.091560857
  4         BRADFORD    17654       12119            0               131               68.64733205            0.742041464
  </code></pre>