>I have an application where I'm not deleting
>records from a table, just terminating them
>by putting a value in TermDate (for archival
>purposes). This obviously causes problems
>if the same record is added again at some
>future point.
>
>The primary is a compound key.
>I thought that filtering the key on
>TermDate = {//}
>might work, but if it did I wouldn't be
>writing now :-)
>
>Is there a standard way of handling this
>outside of changing out key fields?
The standard way is not to reuse primary keys. In fact, if you do reuse, technically you don't have a primary key. You need to add a condition to the PK in order to do this. For example, FOR EMPTY(TermDate). For a complete discussion on PKs, see the KB article on my web site.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer