Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Check Constraint Date Range

447510Jul 26 2010 — edited Jul 27 2010
Hello,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2010
Added on Jul 26 2010
53 comments
16,792 views