Looking for something that's similar to a unique constraint.
The scenario is that I have a table with part numbers and revisions in it. In order to maintain change history, the old revision of the part number stays in the table when the new revision is released. Now say I wanted to create a field called 'isActive' which is a boolean field. The purpose is obviously that when a new revision is released, that version becomes active and the old version is deactivated. I realize this may not be the best way to do this, but for argument's sake, I'm curious how it would be done.
Is there a way to make a unique constraint with the part number and the 'isActive' field for when 'isActive' is true? I don't care about multiple instances of the part number where 'isActive' is false.
The scenario is that I have a table with part numbers and revisions in it. In order to maintain change history, the old revision of the part number stays in the table when the new revision is released. Now say I wanted to create a field called 'isActive' which is a boolean field. The purpose is obviously that when a new revision is released, that version becomes active and the old version is deactivated. I realize this may not be the best way to do this, but for argument's sake, I'm curious how it would be done.
Is there a way to make a unique constraint with the part number and the 'isActive' field for when 'isActive' is true? I don't care about multiple instances of the part number where 'isActive' is false.