title: Getting a sql Error, db2 function error return result
body: <p>My Function is getting a error but I don't know why ...</p>
  
  <p><strong><em>MY (DB2)SQL CODE:</em></strong></p>
  
  <pre><code>CREATE FUNCTION gibX(sseries INTEGER, idd INTEGER) RETURNS Double
   BEGIN
     Declare result Double;
     SELECT ROW_NUMBER() OVER(ORDER BY m.x ASC) AS Row, m.x  INTO result 
     FROM messungen m WHERE m.series=sseries and Row=idd;
     return result;
   END;
  </code></pre>
  
  <p><strong><em>ERROR:</em></strong></p>
  
  <pre><code>CREATE FUNCTION;
     return result;
  ;, DRIVER=4.13.80
  </code></pre>
  
  <p>... and passed successfully.</p>