views:

26

answers:

0

What i'm trying to accomplish, is having a temporal soft delete table.

table Project(ID int)

table ProjectActual(ProjectID int, IsActual bit, ActualAt datetime)

Now is it possible to map a collection of actual projects, where project is actual when there is no record in ProjectActual.ProjectID = ID, or the last record sorted by ActualAt descending has IsActual set to 1 (true)?