title: Remove trailing zero from decimal number
body: <p>I have a one database table field called Amount which type is decimal(18,6). so it is stored in database up to 6 decimal points like 9.786534  But while retrieving that field using select query i have to take care like following </p>
  
  <ol>
  <li>Remove trialling zero e.g if number is 9.230000 then result is only 9.23</li>
  <li><p>If decimal points are all zero then only remove only four trialling zero  e.g If number is 9.000000 then result is 9.00</p></li>
  <li><p>Result is up to 2 decimal point if there are trialling zero.</p></li>
  </ol>
  
  <p>If we write simple query like</p>
  
  <p>select TOP 1 Amount  From EmployeeMaster </p>
  
  <p>then it gives 9.230000</p>
  
  <p>but my intension is to remove trailing zero..</p>
  
  <p>Please help me..</p>