db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Six Fried Rice <tech...@sixfriedrice.com>
Subject Re: Concatenating text from multiple rows
Date Mon, 30 Jun 2008 15:29:17 GMT
On Jun 30, 2008, at 6:18 AM, Rick Hillegas wrote:

> I don't understand the distinction you are drawing between Derby and  
> the Java side. Derby functions let you run your Java code inside the  
> database. You can create a user-defined function which loops through  
> custom_function_parameter inside your query. Then you can write a  
> master query like this:
> select name, concatenateFunctionParameters( id )
> from custom_function
> In the Derby demo code, you can find an example of how to code and  
> use one of these aggregating functions. Just grep the demo code for  
> "getMedianTestScore".


Thanks again for your quick and clear response. I just didn't know  
about this feature. I meant I didn't want to process the JDBC result  
set in my application to get the result, but doing what you describe  
above in Java sounds perfect.

I'm still a derby newbie, so my head is a little in the MySQL way. In  
MySQL, you can define your own functions in C but of course you have  
to compile them into the server. I was hoping not to have to do that  
sort of thing, but if I can write a function as a drop in as you  
describe, then I'm in great shape.

Again, *thank you*.


View raw message