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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Overriding derived values

Re: Overriding derived values

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 29 Nov 2005 16:37:42 -0800
Message-ID: <1133311062.608198.24790@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 Tue Nov 29 2005 - 18:37:42 CST

Original text of this message

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