Oracle透明網(wǎng)關(guān)如何修改人力數(shù)據(jù)庫
本文主要介紹的是Oracle透明網(wǎng)關(guān)在主動修改人力數(shù)據(jù)庫中人員同步的JOB的相關(guān)內(nèi)容的介紹,本文是以相關(guān)代碼的方式來引出Oracle透明網(wǎng)關(guān)在主動修改人力數(shù)據(jù)庫中人員同步的JOB的實際操作內(nèi)容。
/*----------------同步組織機構(gòu)------------------- */
刪除所有的組織機構(gòu)數(shù)據(jù)
- delete eip_sys_department;
插入從人力資源數(shù)據(jù)庫獲得的數(shù)據(jù)
- insert into eip_sys_department
- select distinct section_no||dept_no,section_no,
section,dept_no,dept- from pubpeople@HR_51_PROD.REGRESS.RDBMS.DEV.US.
Oracle.COM- where dept_no is not null;
- insert into eip_sys_department
(id,sectionid,section,deptid,dept)
values('23234','23','天聯(lián)公司','234','經(jīng)營部');
- insert into eip_sys_department
(id,sectionid,section,deptid,dept)
values('23235','23','天聯(lián)公司','235','人力資源部');
- insert into eip_sys_department
(id,sectionid,section,deptid,dept)
values('23236','23','天聯(lián)公司','236','項目部');
- insert into eip_sys_department
(id,sectionid,section,deptid,dept)
values('23238','23','天聯(lián)公司','238','業(yè)務(wù)部');
- insert into eip_sys_department
(id,sectionid,section,deptid,dept)
values('23239','23','天聯(lián)公司','239','綜合部');
提交
- commit;
/*----------------同步組織機構(gòu)完畢-------------------*/
/*----------------同步人員信息-------------------*/
/*
同步信息分成三步
1、刪除掉EIP中院號為“g”開頭,并且在人力資源數(shù)據(jù)庫中不存在的數(shù)據(jù)
2、更新EIP和人力資源中院號相同的人員信息
3、增加在人力資源中存在,在EIP中不存在的人員信息
*/
--刪除在EIP中存在,人力資源中不存在的
- delete from eip_sys_user t
- where username like 'g____%'
- and not exists(
- select 1 from pubpeople@HR_51_PROD.REGRESS.
RDBMS.DEV.US.Oracle.COM pp- where 'g'||pp.user_id=t.username) and HRUSER='y';
以上的相關(guān)內(nèi)容就是對Oracle透明網(wǎng)關(guān)的部分內(nèi)容的介紹,望你能有所收獲。
【編輯推薦】