Académique Documents
Professionnel Documents
Culture Documents
“emp” is a dimension table with “deptno” as Type 2 attribute, if an employee moves from a dept to another dept, update the previous record
with old dept no as expired (flag it as expired with an expiration date) and insert new record with a new dept no as current record.
Columns
currentflag: Y current record, N expired (IBM Doc: not required if you have “expirationdate” defined)
effective date: date when the record was created / effective from (IBM Doc: Only 1 effective date column is allowed )
expirationdate:date when the record expired. (IBM Doc: not required if you have “currentflag” defined)
1
Table Structure:
2
Script to create Table (SQL Server)