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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with REF

Re: Help with REF

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 30 Dec 1998 15:46:14 GMT
Message-ID: <368d4a82.9852076@192.86.155.100>


A copy of this was sent to Helmut Hahn <helmut.hahn_at_bitoek.uni-bayreuth.de> (if that email address didn't require changing) On Mon, 28 Dec 1998 17:07:44 +0100, you wrote:

>Hallo
>
>i try a simple for Row Objects in O8.0.4:
>
>create type TMESSWERT as object (Time DATE,Value NUMERIC(10,2));
>create table MESSWERTE of TMESSWERT;
>insert into MESSWERTE values (sysdate,10.2);
>
>this all works fine. But
>
>select REF(M) from MESSWERTE M where Value = 10.2;
>
>yields a
>ORA-00932: inconsistent datatypes
>
>What am I doing wrong? Please help me!
>
>Thanks Helmut

can you post more info on your environment -- what version of sqlplus are you using ( perhaps an older version then the database -- one that does not understand the ref type?)

I just ran the example above in 8.0.4:

SQL*Plus: Release 8.0.4.0.0 - Production on Wed Dec 30 10:22:16 1998 (c) Copyright 1997 Oracle Corporation. All rights reserved. Connected to:
Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production With the Partitioning and Objects options PL/SQL Release 8.0.4.0.0 - Production

SQL> create type TMESSWERT as object (Time DATE,Value NUMERIC(10,2));   2 /
Type created.

SQL> create table MESSWERTE of TMESSWERT; Table created.

SQL> insert into MESSWERTE values (sysdate,10.2); 1 row created.

SQL> select REF(M) from MESSWERTE M where Value = 10.2;

REF(M)



0000280209403855CD5075108EE0340800207936DC403855CD5074108EE0340800207936DC004024210000

SQL>   Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Dec 30 1998 - 09:46:14 CST

Original text of this message

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