title: SQL: How to Store Integer value in CASE function in sql?
body: <p>I'm working in a Sybase database.I want the 3rd 'WHEN' statement as Integer as output of Original value(<strong>Round((sum(value)*100),1)</strong>). How can I achieve this. Thanks in advance.</p>
  
  <pre><code>CASE  WHEN Round((sum(value)*100),1)&lt;0 THEN 'Neg' 
        WHEN Round((sum(value)*100),1)=0 THEN 'N/A'
        WHEN Round((sum(value)*100),1)&gt;0 THEN  Round((sum(value)*100),1)
  
  END AS RCB
  </code></pre>
  
  <p>Note: here 3rd row indicating error as it is an integer.The error, I'm getting is :
   <strong>Error:-</strong> <code>Data exception - data type conversion is not possible. In CASE expression, incompatible data type at result expression 3, ROUND(COALESCE ((SUM(MSTR.SUM.value)*100),0),1)</code></p>
  
  <p><strong>Secondly</strong> , I tried with Else statement below.</p>
  
  <pre><code>CASE  WHEN Round((sum(value)*100),1)&lt;0 THEN 'Neg' 
        WHEN Round((sum(value)*100),1)=0 THEN 'N/A'
       --WHEN Round((sum(value)*100),1)&gt;0 THEN Round((sum(value)*100),1)
        ELSE Round((sum(value)*100),1)
  END AS RoRC, 
  </code></pre>
  
  <p>But still getting the same error. Please help me out. Thanks.</p>