SCOTT@orcl_11gR2> create table cable
2 (cable_id number,
3 geom sdo_geometry)
4 /
Table created.
SCOTT@orcl_11gR2> insert into cable values
2 (428578,
3 SDO_GEOMETRY
4 (2003, NULL, NULL,
5 SDO_ELEM_INFO_ARRAY (1, 1003, 1),
6 SDO_ORDINATE_ARRAY (5, 1, 8, 1, 8, 6, 5, 7, 5, 1)))
7 /
1 row created.
SCOTT@orcl_11gR2> select * from cable
2 /
CABLE_ID
----------
GEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
-------------------------------------------------------------------------------------
428578
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(5,
1, 8, 1, 8, 6, 5, 7, 5, 1))
1 row selected.
SCOTT@orcl_11gR2> select a.geom.sdo_ordinates
2 FROM cable a
3 WHERE CABLE_ID = 428578
4 /
GEOM.SDO_ORDINATES
-------------------------------------------------------------------------------------
SDO_ORDINATE_ARRAY(5, 1, 8, 1, 8, 6, 5, 7, 5, 1)
1 row selected.
SCOTT@orcl_11gR2> select t.column_value, rownum
2 FROM cable a,
3 TABLE (a.geom.sdo_ordinates) t
4 WHERE a.CABLE_ID = 428578
5 /
COLUMN_VALUE ROWNUM
------------ ----------
5 1
1 2
8 3
1 4
8 5
6 6
5 7
7 8
5 9
1 10
10 rows selected.
SCOTT@orcl_11gR2> select column_value
2 from (select t.column_value, rownum rn
3 FROM cable a,
4 TABLE (a.geom.sdo_ordinates) t
5 WHERE a.CABLE_ID = 428578)
6 where rn = 1
7 /
COLUMN_VALUE
------------
5
1 row selected.
SCOTT@orcl_11gR2>