Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stored Procedure in Hypersonic

 
Nitin Agarwal
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi derby,

I m using Hypersonic DB with Java. I have created database. Now i want to create Stored Procedure. Is Hypersonic supports User defined Stored Procedure ? Because when i use command like "create procedure ....." then it gives error "unexpected token PROCEDURE". So please tell me how to create Stored Procedure in Hypersonic DB. If it does not support then please tell me alternative of it.

Also please help me with this problem too - I am passing a string value to a query. If I pass the string value "Teamwork" i get the desired result. But when i pass "teamwork" i get no value in return.
Is there any way to make the query run ignoring the case of the string value i pass?


Thanks
Nitin
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello-

(Not sure whom you are addressing as "derby" - many people read this forum.)

HSQLDB does not have stored procs in the common sense, but you can call methods written in Java. The user guide has an example that demonstrates how to do that. It's also possible to define triggers written in Java (see the TriggerSample class).
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nitin Agarwal:
Hi derby,

I m using Hypersonic DB with Java. I have created database. Now i want to create Stored Procedure. Is Hypersonic supports User defined Stored Procedure ? Because when i use command like "create procedure ....." then it gives error "unexpected token PROCEDURE". So please tell me how to create Stored Procedure in Hypersonic DB. If it does not support then please tell me alternative of it.

Also please help me with this problem too - I am passing a string value to a query. If I pass the string value "Teamwork" i get the desired result. But when i pass "teamwork" i get no value in return.
Is there any way to make the query run ignoring the case of the string value i pass?


Thanks
Nitin


Nitin,

stored procedures and everything else are covered in the hypersonic documentation, which is onlne, here:
http://hsqldb.org/web/hsqlDocsFrame.html

Yes, hsqldb supports stored procedures, but not in the usual way. Instead you create an alias to a java function; it's in the documentation.

Yes, by default string matching is case-sensitive, if you want case-insensitive matching, you have to use a function such as upper() or lower() to force your data to match. These functions are in the documentation as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic