在HSQLDB版本<中模拟GROUP_CONCAT函数. 2? [英] Simulate GROUP_CONCAT function in HSQLDB versions < 2?

查看:153
本文介绍了在HSQLDB版本<中模拟GROUP_CONCAT函数. 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LO/OOO 基础没有随附的HSQLDB版本> 2,这意味着没有GROUP_CONCAT函数.

LO/OOO Base doesn't come with an HSQLDB version > 2 which means there is no GROUP_CONCAT function.

是否有一种方法可以在HSQLDB版本<中模拟该功能. 2?

Is there a way to simulate this function in HSQLDB versions < 2?

以下是应用该功能之前的列namevalue的示例:

Here's an example for the columns name and value before the function is applied:

TIM   |  51
TIM   |  53
TIM   |  55
JOHN  |  103
JOHN  |  104

我想在Base中使用(H)SQL代码,该代码返回类似于GROUP_CONCAT的结果:

I would like to use (H)SQL code in Base that returns something similar to the result of GROUP_CONCAT:

TIM   | 51, 53, 55
JOHN  | 103, 104

(类似的问题有被要求使用其他DBMS,但答案在HSQLDB中对我不起作用.)

(A similar question has been asked for other DBMS but the answers did't work for me in HSQLDB.)

推荐答案

使用HSQLDB 1.8.0并没有实际的方法.

There is no practical way to do this with HSQLDB 1.8.0.

但是,您可以将LO/OOo随附的jar替换为HSQLDB 2.2.9(发行候选版本atm),并创建和使用外部HSQLDB数据库.现有数据库也可以转换.

You can, however, replace the jar that is supplied with LO/OOo with HSQLDB 2.2.9 (release candidate atm) and create and use external HSQLDB databases. Existing databases can also be converted.

有关详细说明和帮助程序,请参见 http://www.ooofoum.org .此处提供了简短指南: http://user .services.openoffice.org/en/forum/viewtopic.php?f = 83& t = 17567

See the http://www.ooofoum.org for detailed instructions and helper programs. A short guide is here: http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=17567

更新:最新的HSQLDB 2.2.9发行候选版可以与LO/OOo一起使用.嵌入在.odb文件中的数据库已更新为新版本,并且没有最新的HSQLDB无法打开该文件.

Update: The latest HSQLDB 2.2.9 release candidate can be used with LO/OOo. The database embedded in an .odb file is updated to the new version and the file cannot be opened without the latest HSQLDB.

这篇关于在HSQLDB版本&lt;中模拟GROUP_CONCAT函数. 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆