Clear Pay Cycles that are hung up



UPDATE PS_PYCYCL_STAT
 SET PAY_RUN_AP_STATUS = 'N'
 WHERE PAY_CYCLE = 'QUICK1'
 AND PAY_CYCLE_SEQ_NUM = (SELECT MAX(A.PAY_CYCLE_SEQ_NUM)
                         FROM PS_PYCYCL_STAT A
                         WHERE A.PAY_CYCLE = PS_PYCYCL_STAT.PAY_CYCLE)
                         
 DELETE PS_PYCYCL
 WHERE PAY_CYCLE = 'QUICK1'