Needs to implement SCD TYPE 2 Table in SQL server.
Which insert new record and update timestamp if Threshold Values changes for particular Band.
If no changes found then doesn't touch the entry.
| Band | Value | StartDt | Enddt |
|---|---|---|---|
| Junior | 2000 | 1-1-2021 | 31-12-9999 |
| Senior | 3000 | 1-1-2021 | 31-12-9999 |
| BAND | Value |
|---|---|
| Junior | 2500 |
| Senior | 3000 |
Now I wants to update and insert Junior Record
| Band | Value | StartDt | Enddt |
|---|---|---|---|
| Junior | 2000 | 1-1-2021 | Getdate() - 1 |
| Junior | 2500 | Getdate() | 31-12-9999 |
| Senior | 3000 | 1-1-2021 | 31-12-9999 |
Looking for results.