Validations for Date columns
RadsFeb 4 2011 — edited Feb 26 2011 I have an apex application which consists of a report/form region , where I got the data from a view based on 3 tables , now I got to do some validations on one of the date fields . this is the structure of the table 'X' , where size_id is the primary key column
SIZE_ID NUMBER NOT NULL,
PART_ID NUMBER NOT NULL,
EFF_DATE DATE NOT NULL,
END_DATE DATE NULL,
TOTAL_#_parts NUMBER NOT NULL,
STATUS CHAR(1) NOT NULL
when ever the user clicks on to modify an existing record or add a new record , lets say the records are like as below
size_id part_id eff_date end_date total_#_parts status
1001 100 1/1/2009 - 100 A
1002 101 1/1/2009 - 200 A
the effective date and end date should not have any gaps between each of the records and there should not overlap too
that means
size_id part_id eff_date end_date total_#_parts status
1001 100 1/1/2009 100 A
1002 101 2/1/2009 9/1/2009 200 A
when the user is entering the record # 1003 based on record # 1002 ..... the effective date cannot be less than 9/1/2009 or cannot be 9/1/2009
so I need to know as this validation is to be done for existing records as well as new records too as I am newbie to this kindly let me know
how I have to go about this, where I got to write this code or how to implement this functionality
would greatly appreciate your help
thanks
rads
Edited by: user6323208 on Feb 4, 2011 7:41 PM