Re: How to list rows violating constraints, from the exceptions table

From: Martin Douglas <dafis_at_ppp.test.jccbi.gov>
Date: 1996/11/08
Message-ID: <NEWTNews.847464268.26873.dafis_at_ppp.test.jccbi.gov>#1/1


In article <328204CA.7E9E_at_novo.dk>, <chbj_at_novo.dk> writes:
> Path: news.ou.edu!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!Norway.EU.net!nntp.uio.no!nntp.uib.no!nntp-bergen.UNINETT.no!nntp-trd.UNINETT.no!news-c.uni-c.dk!news.uni-c.dk!eagle.novo.dk!usenet
> From: Christian Bjerregård <chbj_at_novo.dk>
> Newsgroups: comp.databases.oracle
> Subject: How to list rows violating constraints, from the exceptions table
> Date: Thu, 07 Nov 1996 16:48:26 +0100
> Organization: Novo Nordisk
> Lines: 6
> Message-ID: <328204CA.7E9E_at_novo.dk>
> NNTP-Posting-Host: chbj.novo.dk
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> X-Mailer: Mozilla 2.0 (WinNT; I)
>
> Anybody out there who knows a good way to get a printout of
> the rows in tables that violate a foreign key constraint,
> and therefore are represented in an exceptions table with
> it rowid.
>
> chbj_at_novo.dk
>
select * from FOREIGN_KEYED_TABLE
 WHERE ROWID IN (SELECT ROW_ID FROM EXCEPTIONS

                 WHERE TABLE_NAME = 'FOREIGN_KEYED_TABLE';

Do a descr on exceptions to see if I have ROWID and ROW_ID are backwards. I alwasy forget which is which.

  Martin Douglas Received on Fri Nov 08 1996 - 00:00:00 CET

Original text of this message