Hi, I have a problem with my code. As you can see i Try to have a sort of CHECK constraint using two columns in the same table but seems does not work. My need is to accept value in EffectiveEndDate only if they are > that EffectiveStartDate.
Any idea how to solve it? thanks for your support! :-)
CREATE TABLE dbo.Test
(
EffectiveStartDate dateTime2(2) NOT NULL,
EffectiveEndDate dateTime2(2) NOT NULL
CONSTRAINT CK_CmsSponsoredContents_EffectiveEndDate CHECK (EffectiveEndDate > EffectiveStartDate),
);