title: Excel to SQL - CEILING and Error code 1582
body: <p>I have the following excel formula:</p>
  
  <pre><code>CEILING(F9*6763.85873627538/((F9-1)*400+6763.85873627538),1)
  </code></pre>
  
  <p>Where F9 is named <code>PROJECTED_QUANTITY</code> in my table <code>sample_size_by_service_id</code></p>
  
  <p>I have the following SQL query written out:</p>
  
  <pre><code>select
  PROJECTED_QUANTITY, ceiling((PROJECTED_QUANTITY*6763.858736275380)/((PROJECTED_QUANTITY - 1)*400+6763.85873627538),1)
  FROM sample_size_by_service_id
  </code></pre>
  
  <p>and I'm getting the following error message:</p>
  
  <blockquote>
    <p>Error Code: 1582. Incorrect parameter count in the call to native
    function 'ceiling' 0.047 sec</p>
  </blockquote>
  
  <p>Not sure what I'm doing wrong here - I'm a novice to SQL and my hours of googling have had me make sure that my PROJECTED_QUANTITY column is an INTEGER type (it is). I suspected that I am badly badgering the combined operators, but I'm not sure how else to write it.</p>
  
  <p>Appreciate any insight! Thanks!</p>