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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to select from object column

RE: How to select from object column

From: Chandini Paterson <chandini.paterson_at_morse.com>
Date: Thu, 01 Feb 2001 03:42:30 -0800
Message-ID: <F001.002A7071.20010201034026@fatcity.com>

Hi,

   Try this

SQL> create type mytype as object
  2 (att1 number,
  3 att2 number);
  4 /

Type created.

SQL> create table mytable
  2 (col1 mytype);

Table created.

SQL> insert into mytable
  2 values(mytype(1,2));

1 row created.

SQL> commit;

Commit complete.

SQL> select p.col1.att1 from mytable p;

COL1.ATT1


        1

SQL> select * from mytable;

COL1(ATT1, ATT2)



MYTYPE(1, 2) HTH,
Chandini Paterson

-----Original Message-----
Sent: 01 February 2001 10:20
To: Multiple recipients of list ORACLE-L

Hi Gurus !

I've got a table and an object type as follows

CREATE TYPE OBJECT AS (ATT1 NUMBER, ATT2 VARCHAR2(5)); CREATE TABLE PARAM(COL1 T_PARAM); How can I select the ATT1 values from the table?

Select COL1.ATT1 from param; doesn`t work.

Gyula

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Andor Gyula
  INET: gy.andor_at_euromacc.hu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Chandini Paterson
  INET: chandini.paterson_at_morse.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Feb 01 2001 - 05:42:30 CST

Original text of this message

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