I am trying to create a spatial network from a shapefile (representing street centrelines) imported into an Oracle DB with FME Desktop. The 'CENTRELINES' spatial object contains a GEOM column that I'd like to use as the basis for a network analysis to allocate ambulance facilities (points) among retirement homes (points) based on route distance as a cost attribute. Any advice on methodology for approaching this morbid problem in Oracle Spatial would be welcome, but the main issue is that I am a beginner at SQL. I've used Oracle's documentation to compose the following SQL statement:
-- 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?
);
The script outputs the following:
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
I understand that line 2 is producing the error:
PLS-00103: Encountered the symbol ";" when expecting one of the following...
Given that semi-colons are required to end an SQL query, why is this a problem?
EDIT: The following script produced the network by adding begin/end:
begin
SDO_NET.CREATE_LRS_NETWORK(
'LRS_net',
'CENTRELINES',
'GEOM',
1,
FALSE,
TRUE);
end;
Thank you for your help!
TRUE)
toTRUE);
. – Bomber