db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: using sql statement in procedure or function
Date Fri, 04 Aug 2006 03:24:33 GMT
Ivan Ooi wrote:

> Nice if I can use SQLJ directly inside there :-) cleaner.
> 
> String ls_code ;
> 
> #sqlj{
> select code
>  into :ls_code
>  from staff
> where year = 1960
> };
> 
> nice to have and nice to dream off :-(

In theory you can. The default SQL-J setup has worked with Cloudscape
(pre-open source) whenever I've tried really simple tests, using the
setup that converted SQL-J to vanilla JDBC. If it worked with an
embedded connection then it should work within a procedure using the
standard JDBC jdbc:default:connection. I don't see how it would be any
different in Derby.

It would be an interesting experiment to try and writeup, first problem
might be where to get SQL-J.

Also, I've spent some time on looking at supporting procedures written
in Java.
http://wiki.apache.org/db-derby/SqlPsmSupport

Dan.




Mime
View raw message