简体   繁体   English

寻找 OpenOffice 基础 SQL 参考

[英]Looking for OpenOffice base SQL reference

(I posted this elsewhere, but this may be a better forum.) (我在其他地方发布了这个,但这可能是一个更好的论坛。)

I recently bought a new laptop and am trying to avoid MS Office.我最近买了一台新笔记本电脑,并试图避免使用 MS Office。 I've loaded OpenOffice 4.1.8, but am having issues writing query statements in OO base.我已加载 OpenOffice 4.1.8,但在 OO 基础中编写查询语句时遇到问题。 Supposedly, OO base uses the HyperSql database engine (don't know what version, perhaps 2.5.1?), but am having difficulty with writing some simple SELECT statements.据说OO基础使用HyperSql数据库引擎(不知道是什么版本,也许是2.5.1?),但是写一些简单的SELECT语句有困难。 (I have extensive experience with both MS Access, Ingres, and a little PostgreSQL). (我在 MS Access、Ingres 和一点 PostgreSQL 方面都有丰富的经验)。

Took me quite awhile to determine that我花了很长时间才确定

SELECT lastname + ', ' + firstname from Accounts

wasn't 'good enough'.不够好。 I had to specify:我必须指定:

SELECT lastname + (', ') + firstname from Accounts

only because I finally muddled through the Backus-Naur form at http://www.hsqldb.org/doc/2.0/guide (2.5.1) site to discover it.只是因为我最终在http://www.hsqldb.org/doc/2.0/guide (2.5.1) 站点上通过了 Backus-Naur 表格来发现它。

That site also led me astray, saying (in the BNF) that ||那个网站也让我误入歧途,说(在 BNF 中)|| was the string concatenation operator, but the OO base said 'invalid use of vertical bars', implying that hsqldb 2.5.1 reference wasn't quite the reference I'm looking for.是字符串连接运算符,但 OO 基础说“无效使用竖线”,这意味着 hsqldb 2.5.1 参考并不是我正在寻找的参考。 (perhaps I need an older version reference?) (也许我需要旧版本的参考?)

In addition, a number of functions don't seem to be available, CONCAT and IFNULL/ISNULL is amongst them.此外,一些函数似乎不可用,CONCAT 和 IFNULL/ISNULL 就是其中之一。 This seems to imply a missing library or two.这似乎意味着缺少一两个库。

So, really, I have two questions: Can anyone point me to an applicable BNF for the OO base (4.1.8) query language?所以,真的,我有两个问题:谁能给我指出一个适用于 OO 基础(4.1.8)查询语言的 BNF? And, perhaps tell me if there's some way I can determine whether I'm missing a library or two of functions that it uses?而且,也许告诉我是否有某种方法可以确定我是否缺少它使用的一个库或两个函数?

Apache OpenOffice has always embedded HSQLDB 1.8, and that is probably still true in AOO 4.1.8. Apache OpenOffice 始终嵌入 HSQLDB 1.8,在 AOO 4.1.8 中可能仍然如此。 To verify your version, check out https://wiki.openoffice.org/wiki/HSQLDB:Tips_and_Tricks#How_to_know_the_version_of_the_embedded_HSQLDB.3F .要验证您的版本,请查看https://wiki.openoffice.org/wiki/HSQLDB:Tips_and_Tricks#How_to_know_the_version_of_the_embedded_HSQLDB.3F Documentation is at http://www.hsqldb.org/doc/1.8/guide/guide.html .文档位于http://www.hsqldb.org/doc/1.8/guide/guide.html The engine and SQL syntax is much more limited than HSQLDB 2 and higher.引擎和 SQL 语法比 HSQLDB 2 和更高版本更受限制。

For something newer, consider LibreOffice Base with Firebird embedded.对于更新的东西,请考虑嵌入 Firebird 的 LibreOffice Base。 Or even better, use Base with PostgreSQL in a split database setup (works with both LO and AOO).或者更好的是,在拆分数据库设置中使用带有 PostgreSQL 的 Base(与 LO 和 AOO 一起使用)。 Split database setups are powerful although they are no longer contained in a single file, which can be less convenient.拆分数据库设置功能强大,尽管它们不再包含在单个文件中,这可能不太方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM