[Misc] เคลียร์ข้อมูล Mapping ใน HR

Coordinator
Jan 29, 2013 at 5:31 PM

-- Mapped table
-- #1 Employee
SELECT * FROM hrm_ps_employees
--    From itself
SELECT name_prefix_seq, * FROM name_prefix_seq
SELECT gender_seq, * FROM gender_seq
SELECT religion_seq, * FROM religion_seq
SELECT race_nat_seq, * FROM race_nat_seq
SELECT nat_seq, * FROM nat_seq
SELECT emp_type_seq, * FROM emp_type_seq
SELECT class_seq, * FROM
SELECT salary_level_seq, * FROM
SELECT pos_seq, * FROM
SELECT working_job_site_seq, * FROM
SELECT emp_status_seq, * FROM
SELECT emp_seq_seq, * FROM
SELECT blood_group_seq, * FROM
SELECT exec_pos_seq, * FROM
SELECT mar_stat_seq, * FROM
SELECT move_seq, * FROM
SELECT old_class_seq, * FROM
SELECT created_by, * FROM
SELECT updated_by, * FROM

--    From other mapping table
SELECT * FROM HRM_PS_EMP_EDUCATIONS
DELETE FROM HRM_PS_EMP_EDUCATIONS

SELECT * FROM HRM_PS_EMP_CHILDRENS
DELETE FROM HRM_PS_EMP_CHILDRENS

SELECT * FROM HRM_PS_EMP_PARENTS
DELETE FROM HRM_PS_EMP_PARENTS

SELECT * FROM HRM_PS_EMP_SPOUSES
DELETE FROM HRM_PS_EMP_SPOUSES

SELECT * FROM HRM_PS_EMP_NAME_HISTORIES
DELETE FROM HRM_PS_EMP_NAME_HISTORIES

SELECT * FROM HRM_PS_EMP_CONTACTS
DELETE FROM HRM_PS_EMP_CONTACTS

SELECT * FROM hrm_ps_emp_position_histories
DELETE FROM hrm_ps_emp_position_histories

SELECT * FROM hrm_ps_emp_salary_histories
DELETE FROM hrm_ps_emp_salary_histories

SELECT * FROM hrm_ps_royal_item_histories
DELETE FROM hrm_ps_royal_item_histories

SELECT * FROM HRM_TRAINING_COURSES_TRAINEES
DELETE FROM  HRM_TRAINING_COURSES_TRAINEES

SELECT * FROM hrm_ps_absences
DELETE FROM hrm_ps_absences

SELECT * FROM hrm_ps_emp_health_check
DELETE FROM hrm_ps_emp_health_check

SELECT * FROM hrm_ps_health
DELETE FROM hrm_ps_health