title: SAP DBTech JDBC : Feature not supported : Scalar UDF does not support SQL Statement
body: <p>I'm new at HANA Studio, so please excuse me.</p>
  
  <p>I am getting an error while creating function in SAP HANA Studio. Here's my function :</p>
  
  <pre><code>CREATE FUNCTION "PAYROLLDBTEST".GetAbsenteeismDays
  (
  -- Add the parameters for the function here
  EmpID integer,
  StartDate Datetime,
  EndDate Datetime
  )
  RETURNS AbsDays float
  LANGUAGE SQLSCRIPT   
  SQL SECURITY INVOKER 
  AS
  AbsDays float;
  BEGIN
  
   (SELECT SUM(DATEDIFF(DAY, "fromDate", "toDate") + 1) AS AbsentDays into AbsDays
                  FROM HEM1
  WHERE "empID" = :EmpID AND "fromDate" BETWEEN :StartDate AND :EndDate
                   AND "toDate" BETWEEN :StartDate AND :EndDate
                   );
  RETURNS AbsDays;
  </code></pre>
  
  <blockquote>
    <p>error :</p>
    
    <p>"Could not execute 'CREATE FUNCTION "PAYROLLDBTEST".GetAbsenteeismDays
    ( -- Add the parameters for the function here ...' in 2 ms 807 µs . 
    SAP DBTech JDBC: [257] (at 576): sql syntax error: incorrect syntax
    near "RETURNS": line 23 col 1 (at pos 576)  "</p>
  </blockquote>