title: How to truncate a floating point number to two decimal points in postgres procedure
body: <p>I am trying to truncate a floating point number to two decimal points. for eg:- the number 14.141244804178488 should become 14.14. Till now i have tried like this</p>
  
  <pre><code>var_A float;
  var_A := 14.141244804178488;
  select  trunc(var_A ,2) into  var_A; 
  raise notice '%', var_A;
  </code></pre>
  
  <p>when i am trying to execute this query, i am getting an exception in the above query. I also tried to solve using the below query;</p>
  
  <pre><code>/*var_A float;
  var_A := 14.141244804178488;*/
  select  trunc(141244804178488 ,2) into  var_A; 
  raise notice '%', var_A;
  </code></pre>
  
  <p>For the above query i am getting the output 14.1400000000000006. Can  anyone help me in this. </p>