2014年6月17日 星期二

SAP HR 轉入 IDempiere ERP

SAP HR 轉入 IDempiere ERP

INSERT INTO HR_Emp_Rank(
  HR_EMP_RANK_ID,HR_EMP_RANK_UU,AD_CLIENT_ID,AD_ORG_ID,
  ISACTIVE, CREATED,CREATEDBY,UPDATED,UPDATEDBY,VALUE,NAME --,DESCRIPTION,HELP
) SELECT  NextidFunc (1000001, 1000000),generate_uuid,11,0,
'Y',sysdate,0,sysdate,0,Rank_ID,Rank_Name
FROM Emp_Rank





INSERT INTO HR_Emp_Rank(
  HR_EMP_RANK_ID,HR_EMP_RANK_UU,AD_CLIENT_ID,AD_ORG_ID,
  ISACTIVE, CREATED,CREATEDBY,UPDATED,UPDATEDBY,VALUE,NAME --,DESCRIPTION,HELP
) SELECT  NextidFunc (1000001, 1000000),generate_uuid,11,0,
'Y',sysdate,0,sysdate,0,dept_ID,dept_Name
FROM dept


select * from ad_sequence WHERE name ='HR_DEPT'     --1000003
select * from ad_sequence WHERE name ='HR_SUB_DEPT' --1000002

INSERT INTO HR_SUB_DEPT(
HR_SUB_DEPT_ID,HR_SUB_DEPT_UU,AD_CLIENT_ID,AD_ORG_ID,
  ISACTIVE, CREATED,CREATEDBY,UPDATED,UPDATEDBY,VALUE,NAME,HR_DEPT_ID )
SELECT  NextidFunc (1000002, 1000000),generate_uuid,11,0,
'Y',sysdate,0,sysdate,0, a.SUB_ID,a.SUB_Name,
(SELECT d.HR_DEPT_ID FROM HR_DEPT d WHERE d.Value=a.dept_id)
 FROM dept a

 commit
 SELECT d.HR_DEPT_ID FROM HR_DEPT d
 (SELECT DISTINCT dept_ID,dept_Name FROM dept )

 ROLLBACK
 COMMIT


 DELETE AD_FIELD_TRL WHERE AD_Language <> 'zh_TW'
 DELETE AD_TAB_TRL WHERE AD_Language <> 'zh_TW'
 DELETE AD_WINDOW_TRL WHERE AD_Language <> 'zh_TW'
 DELETE AD_MENU_TRL WHERE AD_Language <> 'zh_TW'

 COMMIT

沒有留言:

張貼留言