title: HSQL Create Procedure Syntax doesn't seem to match the documentation
body: <p>I am using HSQL as my in memory test db for running integration tests.
  In production, I have an oracle 10g database.  The idea is to run the db create scripts that I used to create the db in oracle to create the same db in hsql for the integration tests.</p>
  
  <p>I'm running into roadblocks regarding differences in syntax, that despite indicating to HSQL that the syntax is oracle, I keep getting stuck on creating stored procedures.</p>
  
  <p>My test db bean is defined as such:</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver"/&gt;
      &lt;property name="url" value="jdbc:hsqldb:mem:test;sql.syntax_ora=true"/&gt;
      &lt;property name="username" value="sa"/&gt;
      &lt;property name="password" value=""/&gt;
  &lt;/bean&gt;
  &lt;jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS"&gt;
      &lt;jdbc:script location="file:Artifacts/sql/install.sql"/&gt;
      &lt;jdbc:script location="file:Artifacts/sql/patchset/1.0.0.02.create_survey_tables.sql"/&gt;
      &lt;jdbc:script location="file:Artifacts/sql/patchset/1.00.01.update.sql"/&gt;
      &lt;jdbc:script location="file:Artifacts/sql/patchset/1.00.03.insert_surveyQA2.sql"/&gt;
      &lt;jdbc:script location="file:Artifacts/sql/patchset/1.00.05.insert_surveyQA4.sql"/&gt;
  &lt;/jdbc:initialize-database&gt;
  </code></pre>
  
  <p>the sql script I'm running has the following create procedure statement:</p>
  
  <pre><code>CREATE PROCEDURE reg_create(
      OUT vregID              NUMBER,
      vsessionID              VARCHAR2(254),
      vextrnID                VARCHAR2(100),
      vindivID                VARCHAR2(100),
      vfirstName              VARCHAR2(100),
      vlastName               VARCHAR2(100),
      vemail                  VARCHAR2(320),
      vaddrLine1              VARCHAR2(254),
      vaddrLine2              VARCHAR2(254),
      vcity                   VARCHAR2(100),
      vstate                  VARCHAR2(2),
      vzipCode                VARCHAR2(5),
      vdiagnosed              NUMBER,
      vrelationship           NUMBER,
      vpatientFirstName       VARCHAR2(100),
      vpatientLastName        VARCHAR2(100),
      vbirthdate              DATE,
      vtreatment              NUMBER,
      vcfCenter               NUMBER,
      vofflineMaterial        NUMBER,
      vmoc                    VARCHAR2(100),
      voptIn                  NUMBER,
      vcreateDate             DATE,
      vpendingSend            NUMBER)
  MODIFIES SQL DATA
  BEGIN  ATOMIC
  DECLARE vregID NUMBER;
  SET vregID = (SELECT NVL(MAX(REG_ID), 0)+1 FROM CFLIVING_REG);
  INSERT INTO REG( REG_ID, SESSION_ID, EXTRN_ID, INDIV_ID, FIRST_NAME, LAST_NAME, EMAIL, ADDR_LINE1, ADDR_LINE2,  CITY,
      STATE, ZIP_CODE, DIAGNOSED, RELATIONSHIP, PATIENT_FIRST_NAME, PATIENT_LAST_NAME, BIRTHDATE, 
      TREATMENT, CF_CENTER, OFFLINE_MATERIAL, MOC, OPT_IN, CREATE_DATE, PENDING_SEND )
      VALUES (vregID, vsessionID, vextrnID, vindivID, vfirstName, vlastName, vemail, vaddrLine1, vaddrLine2, vcity, vstate,
      vzipCode, vdiagnosed, vrelationship, vpatientFirstName, vpatientLastName, vbirthdate,
      vtreatment, vcfCenter, vofflineMaterial, vmoc, voptIn, vcreateDate, vpendingSend);
  END
  </code></pre>
  
  <p>And when I run the test, HSQL fails because of the following:</p>
  
  <pre><code>Caused by: org.springframework.jdbc.datasource.init.ScriptStatementFailedException:   Failed to execute SQL script statement at line 18 of resource URL [file:Artifacts/sql/install.sql]:  CREATE PROCEDURE cfliving_reg_create(         OUT vregID       NUMBER,   vsessionID    VARCHAR2(254),   vextrnID    VARCHAR2(100),   vindivID    VARCHAR2(100),   vfirstName    VARCHAR2(100),   vlastName    VARCHAR2(100),   vemail     VARCHAR2(320),   vaddrLine1    VARCHAR2(254),   vaddrLine2    VARCHAR2(254),   vcity     VARCHAR2(100),   vstate     VARCHAR2(2),   vzipCode    VARCHAR2(5),   vdiagnosed    NUMBER,   vrelationship   NUMBER,   vpatientFirstName  VARCHAR2(100),   vpatientLastName  VARCHAR2(100),   vbirthdate    DATE,   vtreatment    NUMBER,   vcfCenter    NUMBER,   vofflineMaterial  NUMBER,   vmoc     VARCHAR2(100),   voptIn     NUMBER,   vcreateDate    DATE,   vpendingSend   NUMBER) MODIFIES SQL DATA BEGIN  ATOMIC     DECLARE vregID NUMBER
  
  Caused by: java.sql.SQLSyntaxErrorException: unexpected end of statement:  required: ;
  </code></pre>
  
  <p>The documentation on HSQL's site : <a href="http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html" rel="nofollow">http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html</a>
  indicates that my syntax is correct so I am confused as to what the actual problem is.</p>
  
  <p>any ideas?</p>