From: mamin@o2.pl
Newsgroups: comp.databases.oracle.server
Subject: Re: Integrity constraint violated
Date: 8 Aug 2006 05:01:28 -0700
Organization: http://groups.google.com
Lines: 24
Message-ID: <1155038488.494618.281050@b28g2000cwb.googlegroups.com>
References: <1155031051.370417.300980@i42g2000cwa.googlegroups.com>
   <1155035976.755739.76650@h48g2000cwc.googlegroups.com>
   <1155036819.687564.143660@i42g2000cwa.googlegroups.com>
   <1155038126.938542.263170@m79g2000cwm.googlegroups.com>
NNTP-Posting-Host: 84.40.217.56
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1155038493 17478 127.0.0.1 (8 Aug 2006 12:01:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Aug 2006 12:01:33 +0000 (UTC)
In-Reply-To: <1155038126.938542.263170@m79g2000cwm.googlegroups.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 WAR-PRX
Complaints-To: groups-abuse@google.com
Injection-Info: b28g2000cwb.googlegroups.com; posting-host=84.40.217.56;
   posting-account=YFeL3A0AAABTIpUeXD9-9LdtzyPm_V3w
Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!feed.ac-versailles.fr!news.ecp.fr!news.glorb.com!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:272356

> Not very likely.
> Oracle doesn't generate constraints automatically.
> If it did generate constraints, it is because you or someone else, is
> using Designer, and instructed it do to so.
> It looks like either you or someone else has made a design error, and
> you need to rectify this. Drop the foreign key (alter table drop
> constraint) and set up the correct one.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

Well, I'm sure that it was generated automatically.The only one tool
I'm using is TOAD.Maybe this tool can do such things either. The
correct script value for this constraint should be
ALTER TABLE ZAMOWIENIA_POZYCJE ADD (
  CONSTRAINT ZAM_POZ_STAWKA_VAT_FK FOREIGN KEY (STAWKA_VAT_ID)
    REFERENCES STAWKI_VAT (ID));
So the name of the referenced table is incorrect.
Thanks for help.

Best regards,
Marcin

