|
Posted by David Portas on 09/29/05 22:02
Probably something like this. I'm guessing you have an Accounts table
somewhere as well.
CREATE TABLE account_balances
(account_no INTEGER NOT NULL
CONSTRAINT fk_account_balances_accounts
FOREIGN KEY REFERENCES accounts (account_no)
,balance_date DATETIME NOT NULL
,balance NUMERIC(19,4) NOT NULL,
CONSTRAINT pk_account_balances
PRIMARY KEY (account_no,balance_date)) ;
--
David Portas
SQL Server MVP
--
Navigation:
[Reply to this message]
|