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: Update the variable of object datatype?

Re: Update the variable of object datatype?

From: C Chang <cschang_at_maxinter.net>
Date: Thu, 08 Aug 2002 19:07:43 -0400
Message-ID: <3D52F9BF.16F1@maxinter.net>


Jusung Yang wrote:
>
> You have to use the funny-looking THE. Like this:
>
> update THE (select address from home where name='CCHANG') set address='Florida'
> where season='Winter';
>
> C Chang <cschang_at_maxinter.net> wrote in message news:<3D51B0C8.89F_at_maxinter.net>...
> > Our previous DB consultant left behind a table as
> > Home ( name VARCHAR2(20),
> > address Address_t );
> >
> > Address_t is an object type table which is composed with object type
> > datatype- address_o as (season, address) so the table content look like
> > as
> > Home ( 'CCHANG', Address_t(address_o('SUMMER', 'Anchorage'), address_o(
> > 'WINTER', 'Bahama')) );
> >
> > How do I update the SUMMER'address with such structure? I have tried
> > several times with the dot(.) syntax, but never success. And I can't
> > find a similar information in Oracle 8i ref book. Thanks for anyone's
> > help
> >
> > Chisoon

Thanks for both of you. Actually, I found my solution in Oracle 8i SQL Jdeveloper Document. Basicaly I use

UPDATE TABLE ( SELECT h.address FROM Home h WHERE name = 'CCHANG') a SET a.address ='Tahiti'
WHERE a.season='SUMMER';

C CHANG Received on Thu Aug 08 2002 - 18:07:43 CDT

Original text of this message

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