如何在HSQLDB GUI中执行多个命令? [英] How to do multiple commands one execute in the HSQLDB GUI?

查看:109
本文介绍了如何在HSQLDB GUI中执行多个命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从GUI执行许多命令.我想做很多这样的小组,但我无法让一个小组上班.我想我需要以某种方式强制它们之间进行提交,但是我不知道该怎么做.如果我依次按顺序执行这些命令中的每一个,一切都会按预期进行.

I have a number of command that I want to do from the GUI. I want to do many groups of these, but I can't get a single group to work. I presume I need to somehow force commits between them, but I can't figure out how to do that. If I execute each one of these commands by itself in order, everything works as expected.

我正在使用GeoTools的EPSG.zip中的EPSG.dat.

I'm using the EPSG.dat from GeoTools' EPSG.zip.

unzip EPSG.zip
perl -pi -e 's/readonly=true/readonly=false/' EPSG.properties

java -jar hsqldb-2.4.1.jar
jdbc:hsqldb:file:./EPSG

SET AUTOCOMMIT true;  -- Press Execute SQL, but this doesn't seem to help.

CREATE TEXT TABLE EPSG_UNITOFMEASURE_COPY (LIKE EPSG_UNITOFMEASURE);                                                      
GRANT all ON  EPSG_UNITOFMEASURE_COPY TO public;                                                                          
SET TABLE EPSG_UNITOFMEASURE_COPY SOURCE 'EPSG_UNITOFMEASURE_COPY.csv;encoding=UTF-8';                                    
INSERT INTO EPSG_UNITOFMEASURE_COPY SELECT * FROM EPSG_UNITOFMEASURE;                                                     
SET TABLE EPSG_UNITOFMEASURE_COPY SOURCE OFF;                                                                             

然后我得到一个错误:

user lacks privilege or object not found: EPSG_UNITOFMEASURE_COPY / Error Code: -5501 / State: 42501

我很确定这是一个object not found案例.

I am pretty sure this is an object not found case.

推荐答案

您不能将这些命令作为一个块执行.当架构定义语句引用架构对象时,该对象必须已经存在.

You cannot execute these commands as one block. When a schema definition statement refers to a schema object, that object must already exist.

执行CREATE TEXT TABLE,然后可以将其余部分作为一个块执行.

Execute the CREATE TEXT TABLE, then you can execute the rest as a block.

这篇关于如何在HSQLDB GUI中执行多个命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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