Re: Mandatory Relationship

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1997/10/24
Message-ID: <62q2hr$1n0_at_camelot.dsccc.com>#1/1


You could try a pre-commit trigger in the master block to see if the detail block has any data in a field.

You need a pre-delete trigger in the detail block to select count (rowid) from details_table to verify user is not deleting the last row.

John (jbking_at_erols.com) wrote:
[Quoted] [Quoted] : Can anyone tell me how to code the enforcement of a mandatory relationship
: between a master and detail table?
 

: For example, I have a master table which stores primary information and then
: a detail table which stores a history of effective and expiration dates. A
: record in the master table must always have one or more records in the
: detail table.
 

[Quoted] [Quoted] : Which comes first, the chicken or the egg?

--
This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Fri Oct 24 1997 - 00:00:00 CEST

Original text of this message