title: Remove trailing zeroes using sql
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2938296/remove-trailing-zeros-from-decimal-in-sql-server">Remove trailing zeros from decimal in SQL Server</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to use the round function and not show any of the trailing zeroes but still getting some zeroes at the end. I am suppose to get 10.4 but getting something like this: </p>
  
  <pre><code>10.400000
  </code></pre>
  
  <p>Here is my sql:</p>
  
  <pre><code>select round(AVG(CAST(k.TotalNumberDays AS numeric(12,2))),2) TotalNumber
  </code></pre>
  
  <p>How can i remove the trailing zeros here? I need to show only 10.4.</p>