January 21, 2010 at 3:47 pm
Hello, how do I implement a contraint on effective dates?
The table below for example, Codes A & B have their valid effective dates,
when Code "C" is inserted, it will not be allowed until the valid_to of code "B" is set to 3/15/2009.
i.e. no overlaps on the effective dates.
codevalid_fromvalid_to
A1/1/2009 3/1/2009
B3/2/2009 12/31/9999
C3/16/2009 mm/dd/9999
Sincere thanks in advance!
January 21, 2010 at 3:51 pm
Dumb question, but I'm going to ask it any way, why doesn't the insertiong of code C automatically update the effective date (Valid_To) of code B? That, to me, would be the logical process.
January 22, 2010 at 6:13 am
May be this is a job for INSTEAD OF TRIGGER, init?
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.January 22, 2010 at 10:33 am
Thank you Lynn for the reply. That is how I plan to implement it, but I thought I consult first with the experts if there is a better approach out there.
Thanks and Best Regards,
Michael
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply