|
|
Re: Date overlaping check in form 10g [message #580958 is a reply to message #580957] |
Sat, 30 March 2013 07:15 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
irfankundi786@yahoo.com
Messages: 269 Registered: February 2009 Location: pakistan
|
Senior Member |
|
|
i want to control the date range of one emplyee....
eg...date from 01-mar-2013 date_to 10-mar-2013 if this range is enter for the particular employee then between this
range the date should be not enter that is 05,06 upto 10 march should not be enter.
I think this can't be handle through the unique index..
there is code needed..??
|
|
|
|
Re: Date overlaping check in form 10g [message #580960 is a reply to message #580959] |
Sat, 30 March 2013 07:55 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
irfankundi786@yahoo.com
Messages: 269 Registered: February 2009 Location: pakistan
|
Senior Member |
|
|
i have selected employee of date and check it from the date between this
BEGIN
FOR date_cur IN (SELECT pay_emp_id,
from_date,
to_date
FROM pay_emp_itax
WHERE pay_emp_id = :PAY_EMP_ID) LOOP
IF ( :TEXT_FROM_DATE >= date_cur.from_date
AND :TEXT_FROM_DATE <= date_cur.to_date ) THEN ----
Message('Overlaping of Dates is not allowed1');
--EXIT;
RAISE form_trigger_failure;
END IF;
IF ( :TEXT_TO_DATE <= date_cur.to_date
AND :TEXT_TO_DATE >= date_cur.from_date ) THEN
Message('date is not allowd');
--EXIT;
RAISE form_trigger_failure;
END IF;
END LOOP;
END;
but actual problem is
i this date range is
from date to date
03-03-2013 10-03-2013
now if entered date between thse range work well but if i entered the date like from 01-03-2013 to 12-03-2013 for this it is not worked ...??????????????????
actualy i want to this is also should not enteredddddd
[EDITED by LF: formatted code, applied [code] tags]
[Updated on: Sat, 30 March 2013 09:28] by Moderator Report message to a moderator
|
|
|
|
|
|
|