I don't understand this validation. I have a table on which the primary key (1 column) is also used as look-up display value. This should be unique. The code like below illustrates it the best I think;
-- code generated by the SF;
create table dbo.[dummy]
(
dummy_id varchar(100) not null,
dummy_description varchar(500) null,
tsf_valid_from datetime2 (2) generated always as row start hidden not null ,
tsf_valid_to datetime2 (2) generated always as row end hidden not null ,
constraint [dummy_pk] primary key clustered
(
dummy_id
),
period for system_time (tsf_valid_from, tsf_valid_to)
)
go
insert into dummy (dummy_id) values ('Test'), ('Test') -- second insert will fail
I think the validation is in this case invalid?