 

SELECT  * FROM HRIS_OVERTIME WHERE
DESCRIPTION='THIS IS AUTOGENERATED OT REQUEST FROM COMPULSORY OT.' 
AND EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM HRIS_EMPLOYEES WHERE COMPANY_ID =2);

DELETE FROM HRIS_OVERTIME_DETAIL WHERE OVERTIME_ID IN (SELECT  OVERTIME_ID FROM HRIS_OVERTIME WHERE
DESCRIPTION='THIS IS AUTOGENERATED OT REQUEST FROM COMPULSORY OT.' 
AND EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM HRIS_EMPLOYEES WHERE COMPANY_ID =2));

DELETE FROM HRIS_OVERTIME WHERE
DESCRIPTION='THIS IS AUTOGENERATED OT REQUEST FROM COMPULSORY OT.' 
AND EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM HRIS_EMPLOYEES WHERE COMPANY_ID =2);

SELECT * FROM HRIS_NOTIFICATION WHERE MESSAGE_TITLE ='Compulsory OT' AND MESSAGE_ID IN (SELECT EMPLOYEE_ID FROM HRIS_EMPLOYEES WHERE COMPANY_ID =2);