db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Recursive query on common table
Date Fri, 09 Oct 2009 13:17:00 GMT
Vrin26 wrote:
> Hi,
>
> I need to do a recursive query on a single derby database table.
> In Derby database documents it is mentioned that this derby doesn't support
> recursive queries.
> Is there any other work around to handle this scenario?
>
> Thanks
>
>   
You can push the recursion into a table function or into a database 
procedure which returns a result set. The table function documentation 
talks about wrapping external data sources, but you can also use table 
functions to wrap complicated processing inside Derby itself. See 
http://db.apache.org/derby/docs/10.5/devguide/devguide-single.html#cdevspecialtabfuncs 
The CREATE PROCEDURE statement is documented here: 
http://db.apache.org/derby/docs/10.5/ref/ref-single.html#crefsqlj95081

Hope this helps,
-Rick

Mime
View raw message