SDO - how to create lines from PL/SQL
Hello,
I need to create a line objet in a table (TRAJECTORY) from selected points on another table (STATION).
STATION description is
station_id number,
trajectory_id number,
longitude float,
latitude float,
shape mdsys.sdo_geometry
TRAJECTORY description is
trajectory_id number,
shape mdsys.sdo_geometry
I would like to do something like
update trajectory set shape =
MDSYS.SDO_GEOMETRY
(
2002,
NULL,
NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),
MDSYS.SDO_ORDINATE_ARRAY
(select longitude, latitude from station S where S.trajectory_id = trajectory_id)
);
It does not work.
I do not want to use an SQLLOAD because it is supposed to be updated with a trigger or a regular call to a store procedure.
Thanks in advance for your help,
Vincent ROBINE