Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.56 KB

exit_verification_scrud_view.md

File metadata and controls

39 lines (33 loc) · 1.56 KB

hrm.exit_verification_scrud_view view

Schema hrm
Materialized View Name exit_verification_scrud_view
Owner frapid_db_user
Tablespace DEFAULT
Description

Source:

 CREATE OR REPLACE VIEW hrm.exit_verification_scrud_view
 AS
 SELECT exits.exit_id,
    exits.employee_id,
    ((employees.employee_code::text || ' ('::text) || employees.employee_name::text) || ')'::text AS employee,
    employees.photo,
    exits.reason,
    ((forwarded_to.employee_code::text || ' ('::text) || forwarded_to.employee_name::text) || ' )'::text AS forward_to,
    ((employment_statuses.employment_status_code::text || ' ('::text) || employment_statuses.employment_status_name::text) || ')'::text AS employment_status,
    ((exit_types.exit_type_code::text || ' ('::text) || exit_types.exit_type_name::text) || ')'::text AS exit_type,
    exits.details,
    exits.exit_interview_details
   FROM hrm.exits
     JOIN hrm.employees ON employees.employee_id = exits.employee_id
     JOIN hrm.employment_statuses ON employment_statuses.employment_status_id = exits.change_status_to
     JOIN hrm.exit_types ON exit_types.exit_type_id = exits.exit_type_id
     JOIN hrm.employees forwarded_to ON forwarded_to.employee_id = exits.forward_to
  WHERE exits.verification_status_id = 0 AND NOT exits.deleted;

Related Contents