OpenOffice Base 中的 sql 方言
我熟悉 SQLite 和 MySQL 中的 SQL,但 OpenOffice Base 似乎要么非常瘫痪,要么我不明白如何执行原始 SQL。
我想(有效地)做到这一点:
INSERT INTO t2 SELECT NULL as id, t.foo, t.bar, '' as baz, 0 as quux
FROM MyTable t
我所能做的就是
SELECT t.foo, t.bar, '' as baz, 0 as quux FROM MyTable t
因为 NULL 似乎会给 Base 带来混乱,正如 INSERT INTO T2 SELECT ...
语法一样。
谁能建议我如何解决这个问题?
I'm familiar with SQL in SQLite and MySQL, but OpenOffice Base seems to be either very crippled, or I don't understand how to execute raw SQL.
I want to do (effectively) this:
INSERT INTO t2 SELECT NULL as id, t.foo, t.bar, '' as baz, 0 as quux
FROM MyTable t
All I can do is
SELECT t.foo, t.bar, '' as baz, 0 as quux FROM MyTable t
because the NULL seems to give Base confusion, as does the INSERT INTO T2 SELECT ...
syntax.
Can anyone suggest how I need to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实上,那里不接受 NULL。它应该。您能否将此作为错误归档并将其分配给[email protected] 这样我就不会忘记修复它?谢谢。
一般来说,为了避免 Libre/OpenOffice 尝试解析/理解您的查询,并将其按原样发送到数据库引擎,请使用“直接运行 sql 命令”或“分析 SQL:否”
Indeed, NULL is not accepted there. It should. Could you please file this as a bug and assign it to [email protected] so that I don't forget to fix it? Thanks.
In general, to avoid Libre/OpenOffice from trying to parse/understand your query, and send it to the database engine pristine as-is, use "run sql command directly" or "analyze SQL: no"