title: Using SELECT INTO in HSQL 2.2 routines
body: <p>When I migrate a Oracle Function to HSQLDB I need translate the "Select into" for HSQLDB. The Oracle script may look like:</p>
  
  <pre><code>CREATE FUNCTION getId()
  RETURN NUMBER IS 
         temp_id NUMBER;
  ...
  
  BEGIN
  ....    
    SELECT id id INTO temp_id from ( select id form ..... );
  </code></pre>
  
  <p>In HSQLDB 2.0.0, I can do the following:</p>
  
  <pre><code> CREATE FUNCTION getId()
  RETURNS BIGINT 
  BEGIN ATOMIC 
    DECLARE temp_id BIGINT;
  ....
  
    SET temp_id = SELECT id id FROM ....
  </code></pre>
  
  <p>However, it doesn't work in HSQLDB 2.2.9 anymore. The error message is:</p>
  
  <blockquote>
    <p>[CREATE - 0 row(s), 0.000 secs]  [Error Code: -5608, SQL State: 42608]
    wrong or missing data impact clause in declaration: READS SQL in
    statement</p>
  </blockquote>
  
  <p>From the release note of HSQLDB 2.2, it says they already support "select into", but I didn't find the way.</p>
  
  <p>Anyone know how to do it in HSQLDB 2.2.9?</p>