Re: Overriding derived values

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 29 Nov 2005 16:37:42 -0800
Message-ID: <1133311062.608198.24790_at_f14g2000cwb.googlegroups.com>


CREATE TABLE Discounts
(player_id CHAR(15) NOT NULL
  REFERENCES Players (player_id)
  ON DELETE CASCADE
  ON UPDATE CASCADE,
 start_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,  end_date DATETIME,
 discount_percent DECIMAL (3,2) DEFAULT 0.00 NOT NULL,  CHECK (start_date < end_date),
 PRIMARY KEY (player_id, start_date));

Use a NULL to represent "eternity" and use a stored procedure to add one-month rows based on the bowler's average.

If they are not on the "permanent bad guy list" as shown by (end_date IS NULL), then leave the row until it is manually overridden. Received on Wed Nov 30 2005 - 01:37:42 CET

Original text of this message