Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question: How to prevent mutually exclusive values?

Re: SQL question: How to prevent mutually exclusive values?

From: Kay Kanekowski <k.kanekowski_at_phnxsoft.com>
Date: 1998/12/03
Message-ID: <366641AA.E76A0051@phnxsoft.com>#1/1

Hi,

I think you need a Insert-Update STATEMENT Trigger, because you have to look at all rows with the same ARREST_ID. But in a statement-trigger you don't know which is interestung row, so you must check all rows against all rows with a 'select count(count(*)) .. group by decode ( weapon_type, 'NONE', 1, 0 )' or somethig like that.

The other way is to change Data-Model. I think it's more easier to implement a column in the ARREST table to indicate the WEAPON_TYPE 'NONE' or not. Then you are able to write a ROW-Level trigger for the WEAPON table that looks at this column in the master ARREST row.

Kay Received on Thu Dec 03 1998 - 00:00:00 CST

Original text of this message

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