Hi ,
You can use check constraint on column which will check date is grater than 1 jan 2007 or you can create trigger before insert or update which will check that date is grater than 1 jan 2007 .
easy way to use check constraint on column
below is example
CREATE TABLE test
(
log_date DATE CHECK(log_date > to_date('01/01/2007' , 'dd/mm/yyyy'))
)
if table already exists then use
ALTER TABLE test
ADD CONSTRAINT con_chk CHECK(log_date > to_date('01/01/2007' , 'dd/mm/yyyy'))
but for this command to run there should not be single row having date less than 1 jan 2007
Last Wiki Answer Submitted: March 12, 2008 4:38 am by BlueStar90 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
It should be a simple date comparison…
…. where date > ’1/1/2007′
The only tag you have is SQL (oracle) Date Constraints. Do you want this as a SQl statement or someother language, like vbscript.
Be sure and check out my blog here on ITKE for more Network administration and VBSCRIPT tips.
The VBScript Network and Systems Administrator’s Cafe