THNKS A LOT ,
I need to dynamic code , no hard code ,
So that it works (trigger) when the repetition of the situation,
insert into his (emp_no, start_date, end_date)
values (rec.emp_no, store_his.hisUpd(i).end_date, to_date('2005-01-01', 'YYYY-MM-DD'));
Thanks a lot
see
store record: 2001-10-10 2005-01-01 ok
when i insert new reocrd start_date & end_date
nested between store record start_date & end_date :::>>>
2001-10-10 ( 2002-01-30 - 2003-09-01 ) 2005-01-01I Need to separate the dates and the distribution on record for same emp_no :::>>>...
assuming one record store in the table HST,
create table(emp_no,start_date,end_date)
primary_key(emp_no,start_date)
---------------------------------------::::
emp_no start_date end_date
------- ---------- ----------
10 2001-10-10 2005-01-01...
I create this trigger:
CREATE OR REPLACE TRIGGER T_HST AFTER INSERT
On HST
FOR EACH ROW
DECLARE
Begin
INSERT INTO HST (EMP_NO, START_DATE )
SELECT EMP_NO, SYSDATE
FROM HST
WHERE EMP_NO = :NEW.EMP_NO;
End T_HRS_SAL_PERIOD_HSTY_UPD_PRI;
/
when I insert a new...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.