RE: Referencing variables in Object Data Types

RE: Referencing variables in Object Data Types

 

  

This should solve your problem - Sowa

drop table ports
/
create table ports(port_id VARCHAR2(10), shape MDSYS.SDO_GEOMETRY)
/
INSERT INTO ports VALUES( 'VA20', MDSYS.SDO_GEOMETRY(2001, --sdo_gtype
8307, -- sdo_srid

MDSYS.SDO_POINT_TYPE( -122208, 214019, NULL), -- x, y, z
NULL, --
sdo_elem_info_array
NULL )) --
sdo_ordinate_array
/

select t.shape.sdo_point.x from ports t
/

-----Original Message-----
From: Sowa
[mailto:oracledba-ezmlmshield-x64914811.[Email address protected]
Sent: Friday, November 12, 2004 9:58 AM
To: LazyDBA Discussion
Subject: 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






--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Disclaimer:
The information contained in this e-mail, including any attachments to it, is confidential and intended only for the person(s) to whom it is addressed. Any examination, distribution, disclosure, printing, or copying of this information, or reliance upon this information by any person other than the intended recipient(s) is strictly prohibited. If this e-mail has been misdirected and you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system. The views and opinions contained in this transmission represent those of the author and do not necessarily reflect those of AIRCOM International. AIRCOM International may monitor incoming and outgoing e-mails. By replying to this message, you consent to this monitoring. This e-mail has been scanned by McAfee Group Shield prior to transmission. However, recipients are advised to apply their own antivirus detection measures to this e-mail and any attachments upon receipt. AIRCOM International does not accept liability for any damage or losses arising as a result of receiving this e-mail.
Learn more about AIRCOM'S Service Assurance & Performance Management Solutions at IIR Network Optimisation Conference, 8th-11th November 2004, Nice

Oracle LazyDBA home page