title: Decoding fields in Mysql
body: <p>I want to get net amount from my mysql data field. I have tried to decode the fields like the below.. But I am getting the Error:</p>
  
  <blockquote>
    <p>"Lookup Error - MySQL Database Error: Incorrect parameter count in the call to native function 'decode'"</p>
  </blockquote>
  
  <p>Can anybody help?</p>
  
  <p>Query I have used: </p>
  
  <pre><code>select decode (txn_type ,'Exense',-txn_amount,txn_amount)as net_amount where id &gt; 0
  </code></pre>