Subject | COMPUTED BY between 2 tables |
---|---|
Author | Klett |
Post date | 2006-03-17T12:42:15Z |
Hello,
It's my first message on this forum. I apologize for my bad English.
Here is my problem.
I 've 2 tables
TABLE_1
ID_Table1 INTEGER NOT NULL,
....
Date1 DATE,
.....
ALTER TABLE Table_1 ADD CONSTRAINT PK_TABLE_1 PRIMARY KEY (ID_Table1);
TABLE 2
ID_Table2 INTEGER NOT NULL,
ID_Table1 INTEGER,
.....
Date2 DATE,
....
ALTER TABLE Table_2 ADD CONSTRAINT PK_Table_2 PRIMARY KEY (ID_Table2);
ALTER TABLE Table_2 ADD CONSTRAINT FK_Table_2 FOREIGN KEY (ID_Table1)
REFERENCES Table1 (ID_Table1);
I would have a COMPUTED BY Field on the Table 2
"Date2" - "Date1"
Is it possible ?
Thanks for any hep
It's my first message on this forum. I apologize for my bad English.
Here is my problem.
I 've 2 tables
TABLE_1
ID_Table1 INTEGER NOT NULL,
....
Date1 DATE,
.....
ALTER TABLE Table_1 ADD CONSTRAINT PK_TABLE_1 PRIMARY KEY (ID_Table1);
TABLE 2
ID_Table2 INTEGER NOT NULL,
ID_Table1 INTEGER,
.....
Date2 DATE,
....
ALTER TABLE Table_2 ADD CONSTRAINT PK_Table_2 PRIMARY KEY (ID_Table2);
ALTER TABLE Table_2 ADD CONSTRAINT FK_Table_2 FOREIGN KEY (ID_Table1)
REFERENCES Table1 (ID_Table1);
I would have a COMPUTED BY Field on the Table 2
"Date2" - "Date1"
Is it possible ?
Thanks for any hep