title: how to get rid of decimal points in netezza
body: <p>Hi I have a weird requirement </p>
  
  <p>if an amount value is 0.00 i need to display it as 0 
  and if its something else like
  23.12 I need to have the decimal points and display as 23.12...
  tried below code in netezza but doesn't work</p>
  
  <pre><code>select 
  case when amount=0.00 then 0
  else amount
  end;
  
  select case when amount=0.00 then to_char(amount,99)
  else to_char(amount,999999.99)
  end;
  </code></pre>
  
  <p>they work when I write as select to_char(amount,99) from _v_dual;
  but doesn't work in case statement I get error like invalid format in to-char...</p>
  
  <p>am completely stuck here any help is greatly appreciated.</p>