Path: news.easynews.com!easynews!sn-xit-02!sn-xit-05!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: C Chang <cschang@maxinter.net>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Update the variable of object datatype?
Date: Thu, 08 Aug 2002 19:07:43 -0400
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <3D52F9BF.16F1@maxinter.net>
X-Mailer: Mozilla 3.01Gold (Win95; I)
MIME-Version: 1.0
References: <3D51B0C8.89F@maxinter.net> <42ffa8fa.0208080915.20eaa58e@posting.google.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: newsabuse@supernews.com
Lines: 32
Xref: easynews comp.databases.oracle.misc:85346
X-Received-Date: Thu, 08 Aug 2002 15:56:52 MST (news.easynews.com)

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@maxinter.net> wrote in message news:<3D51B0C8.89F@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
