I want to execute multiple SQL statements by bunching them as a stored procedure. I know that Hypersonic sql supports stored procedure but could anyone please instruct me how to create procedure in hssql?
If what you say is true, and hssql supports stored procedures, they should support the SQL standard for creating them, which is something like: create procedure procedure_name as select statement goes here And that's it. You can get a lot fancier by adding variables to the select statement for the stored procedure to deal with so as to not make everything so static. But that is the jist of it. Sometimes Stored Procedure syntax can very from vendor to vendor, however, the above code should work on pretty much every vendor. Especually something like HSSQL. Let me know if that works for you or not.
Hi Gregg, I still cannot create stored procedure in hssql. Below is the instructions from mycgiserver.com: " Stored Procedures / Functions Stored procedures are Java functions that are called directly from the SQL language or using an alias. Calling Java functions (directly or using the alias) requires that the Java class can be reached by the database (server). The syntax is: "java.lang.Math.sqrt"(2.0) This means the packacke must be provided, and the name must be written as one word, and inside " because otherwise it is converted to uppercase (and not found). An alias can be created using the command CREATE ALIAS: CREATE ALIAS SQRT FOR "java.lang.Math.sqrt" When an alias is defined, then the function can be called additionally using this alias: SQRT(2.0)"
What you are confusing is Java stored procedures, and SQL stored procedures. If HS only supports Java stored procedures, you need to write the stored procedure in Java - not SQL... Check out the HS docs for details about how to do this...