I have a very simple HSQLDB CREATE PROCEDURE statement:
CREATE PROCEDURE test_procedure()
CONTAINS SQL
BEGIN
DECLARE test_variable INTEGER;
SET test_variable = 0;
END
When I try to execute this SQL using SQLTool, it fails with a "Unterminated input" error. The command I am using is:
java -jar -cp $HSQLDB_HOME/lib/sqltool.jar:$HSQLDB_HOME/lib/hsqldb.jar $HSQLDB_HOME/lib/sqltool.jar db script.sql
The exact error I get is:
SEVERE Error at 'script.sql' line 7:
"? CREATE PROCEDURE test_procedure()
CONTAINS SQL
BEGIN ATOMIC
DECLARE test_variable INTEGER;
SET test_variable = 0;
END"
Unterminated input: "CREATE PROCEDURE test_procedure()
CONTAINS SQL
BEGIN ATOMIC
DECLARE test_variable INTEGER;
SET test_variable = 0;
END"
org.hsqldb.cmdline.SqlTool$SqlToolException
So far I have figured out this much:
I am out of ideas at this point. Has anyone encountered this error? Is there something that can be done about it?
You can follow the examples in the guide and use the sample files as template:
http://hsqldb.org/doc/2.0/util-guide/sqltool-chapt.html#sqltool_embedded-langs-sect