Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!c03.atl99!news.webusenet.com!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: DA Morgan <damorgan@exxesolutions.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Changing Foreign Key Entry
Date: Fri, 04 Apr 2003 08:33:13 -0800
Organization: EXE
Message-ID: <3E8DB3C9.105915FB@exxesolutions.com>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
References: <b6huta$5jso8$1@ID-121870.news.dfncis.de> <3E8CA783.DA5EAABF@exxesolutions.com> <b6jjrr$4d0$1@news.mch.sbs.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cache-Post-Path: yasure!unknown@splish28.drizzle.com
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
X-Complaints-To: abuse@supernews.com
Lines: 43
Xref: newsfeed1.easynews.com comp.databases.oracle.misc:95831
X-Received-Date: Fri, 04 Apr 2003 09:33:51 MST (news.easynews.com)

Su Man wrote:

> One Question :
>
> Don't we have something like ON UPDATE CASCADE ( similar to ON DELETE
> CASCADE) ???
>
> "DA Morgan" <damorgan@exxesolutions.com> wrote in message
> news:3E8CA783.DA5EAABF@exxesolutions.com...
> > Nicolas Bronke wrote:
> >
> > > In a database there are existing a foreign key. The fieldtype is
> Varchar2.
> > > Now one entry of the foereign key shall be changed, because of a
> misspelling
> > > in the reference table and therefore also in the detail tables.
> > >
> > > I thought I have to disable the foreign key, change the value and enable
> the
> > > foreign key again.
> > >
> > > Now someone told me that there is also another way via a trigger on the
> > > reference table. Is that true?
> > >
> > > Regards
> > > Nicolas
> >
> > Add the correct value to the lookup table
> > update the child table
> > delete the incorrect value.
> >
> > This is not a proper use of a trigger or any other complicated way to
> perform a
> > simple update.
> >
> > Daniel Morgan
> >

You can write your own but that is irrelevant. You are still trying to overly
complicate a very simple bit of maintenance.

Daniel Morgan

