Re: [h2] "order by" in custom aggregate function

2013-07-26 Thread Brian Craft
Cool, thanks! On Friday, July 26, 2013 8:25:43 AM UTC-7, Thomas Mueller wrote: > > Hi, > > What you could try is pass two parameters to your group_bconcat aggregate > function, the first one the value and the second the sort value. That way > the function can sort itself (which is what group_con

Re: [h2] "order by" in custom aggregate function

2013-07-26 Thread Thomas Mueller
Hi, What you could try is pass two parameters to your group_bconcat aggregate function, the first one the value and the second the sort value. That way the function can sort itself (which is what group_concat does as well). That would look as follows: select group_bconcat(binData, orderColumn) fro

Re: [h2] "order by" in custom aggregate function

2013-07-26 Thread Brian Craft
Here's the query with standard group_concat and cast: SELECT CAST(GROUP_CONCAT(`expScores` ORDER BY `i` SEPARATOR '') AS BINARY) AS `expScores` FROM `probes` LEFT JOIN `joins` ON `probes`.`id` = `pid` LEFT JOIN `scores` ON `sid` = `scores`.`id` WHERE (`probes`.`eid` = (SELECT id FROM `experime

Re: [h2] "order by" in custom aggregate function

2013-07-26 Thread Noel Grandin
Do you have a more complete example of what exactly you are trying to do with your custom aggregate? On 2013-07-26 00:34, Brian Craft wrote: I'm unable to use "order by" with a custom aggregate function. E.g with group_concat, you can do group_concat(`foo` order by `bar`) however this throws

[h2] "order by" in custom aggregate function

2013-07-25 Thread Brian Craft
I'm unable to use "order by" with a custom aggregate function. E.g with group_concat, you can do group_concat(`foo` order by `bar`) however this throws a syntax error with my aggregate function. -- You received this message because you are subscribed to the Google Groups "H2 Database" group.