Referencing variables in Object Data Types

Referencing variables in Object Data Types

 

  

Hello List,

My qeustion is about referencing variables in Oracle's Object Data Types.


Here is what I have done. I have a table with port_id and shape. The shapes are stored as points in x,y coordinates

create table ports(port_id VARCHAR2(10), shape MDSYS.SDO_GEOMETRY);

I have inserted rows as in this example:

INSERT INTO ports VALUES( 'VA20',
MDSYS.SDO_GEOMETRY(
2001, --sdo_gtype
8307, -- sdo_srid
MDSYS.SDO_POINT( -122208, 214019, NULL), -- x, y, z
NULL, -- sdo_elem_info_array
NULL )); __ sdo_ordinate_array

I want to update the shape columns with new values for the points.

Howcan I reference for example, the X value in mdsys.sdo_point?

I have done this:

select shape.sdo_point.X from ports;

Oracle says that shape.sdo_point.X is an invalid identifier:


Any suggestions with SQL to reference variables in the object data types above. This is all about Oracle Spatial and Locator.


Thanks

Sowa





Oracle LazyDBA home page