【发布时间】:2013-03-16 23:44:55
【问题描述】:
我正在尝试从使用 FME Desktop 导入 Oracle DB 的 shapefile(代表街道中心线)创建空间网络。 “CENTRELINES”空间对象包含一个 GEOM 列,我想将其用作网络分析的基础,以根据路线距离作为成本属性在养老院(点)之间分配救护车设施(点)。欢迎任何有关在 Oracle Spatial 中解决这个病态问题的方法的建议,但主要问题是我是 SQL 的初学者。我使用 Oracle 的documentation 编写了以下 SQL 语句:
-- create an LRS geometry network
EXEC SDO_NET.CREATE_LRS_NETWORK(
'LRS_net', -- network name
'CENTRELINES', -- LRS geometry table name
'GEOM', -- LRS geometry column name
1, -- number of hierarchy levels
FALSE, -- directed link?
TRUE -- node with cost?
);
脚本输出以下内容:
Error starting at line 2 in command:
EXEC SDO_NET.CREATE_LRS_NETWORK(
Error report:
ORA-06550: line 1, column 34:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
...
Error starting at line 9 in command:
)
Error report:
Unknown Command
我知道第 2 行产生了错误:
PLS-00103: Encountered the symbol ";" when expecting one of the following...
鉴于结束 SQL 查询需要分号,为什么会出现问题?
编辑:以下脚本通过添加开始/结束来生成网络:
begin
SDO_NET.CREATE_LRS_NETWORK(
'LRS_net',
'CENTRELINES',
'GEOM',
1,
FALSE,
TRUE);
end;
感谢您的帮助!
【问题讨论】:
-
我添加了开始/结束语法:
-
第8行需要加分号。将
TRUE)改为TRUE);。
标签: sql oracle networking spatial oracle-spatial