Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get at object values...

Re: How to get at object values...

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Thu, 14 Apr 2005 17:41:47 +0200
Message-ID: <d3m2vq$m9v$1@nntp.fujitsu-siemens.com>


cc to you, but I'll post this one here anyway. "DA Morgan" <damorgan_at_x.washington.edu> schrieb im Newsbeitrag news:<1113492072.222305_at_yasure>...
> Volker Hetzer wrote:
> > "DA Morgan" <damorgan_at_x.washington.edu> schrieb im Newsbeitrag news:1113441782.298443_at_yasure...
> >
> >>Volker Hetzer wrote:
> >>>When I deal with objects (particularly geometries in spatial),
> >>>sqlplus returns nice ASCII descriptions of the geometry objects.
> >>>How can I do the same thing from an api? Is there some
> >>>object-to-constructor-function that I'm overlooking?
> > SQL> select outline from cvc_outlines;
> >
> > OUTLINE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
> > --------------------------------------------------------------------------------
> > SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 5, 1, 2, 1, 3, 2, 1,
> > 5, 2, 2, 9, 2, 1, 11, 2, 1), SDO_ORDINATE_ARRAY(-11.55, 10.85, -11.55, 11.75, -
> > 13.25, 11.75, -13.320711, 11.7207107, -13.35, 11.65, -13.35, 10.85, -11.55, 10.8
> > 5))
> I suspect I still don't know precisely what you are asking but try this:

>

> CREATE OR REPLACE TYPE rectangle_t AS OBJECT (
> h NUMBER,
> w NUMBER,
> x NUMBER,
> y NUMBER);
> /
>

> CREATE TABLE rectable (
> rectangle_name VARCHAR2(20),
> rectangle rectangle_t);
> desc rectable
> set describe depth all
> desc rectable
> set describe depth all linenum on indent on
> desc rectable
> In the right direction or not?

I don't think it is, because desc only works on sqlplus. Sqlplus is fine, what I'd like is some ObjectToVarChar2 conversion which gives me on a fetch from oci or embedded sql the same string sqlplus gives me, namely SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 5, 1, 2, 1, 3, 2, 1, 5, 2, 2, 9, 2, 1, 11, 2, 1), SDO_ORDINATE_ARRAY(-11.55, 10.85, -11.55, 11.75, -13.25, 11.75, -13.320711, 11.7207107, -13.35, 11.65, -13.35, 10.85, -11.55, 10.85))
.

Lots of Greetings!
Volker Received on Thu Apr 14 2005 - 10:41:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US