Check Constraint Date Range
447510Jul 26 2010 — edited Jul 27 2010Hello,
I have a table where measurements are stored for different vendors.
I have vendor_code, product_id,start_date, end_date and measurements.
I would like to have a check constraint if user tries to add a new measurement for a given vendor, product id should not be allowed to be added in the start_date and end date range.
Eg.
Not new records are not allowed to enter if start date and end date falls between 01-Jan-2005 and 31-Dec-2008
User is allowed to enter measurements either date less than 01-Jan-2005 or greater than 31-Dec-2008.
How can I implement this logic as check constraint?
Thanks