Solve a Mutating trigger
How can i solve this mutating trigger? the option i have seen through google is with the use of a compound trigger but i have never used them before some assistance will be appreciated. Below is the trigger
CREATE OR REPLACE TRIGGER EXPORT_DATA
AFTER INSERT ON EMPLOYEES
FOR EACH ROW
WHEN (NEW.salary > 3000)
DECLARE
CURSOR emp_data IS
SELECT employee_id, first_name, last_name, salary, job_id, department_id
FROM employees;
v_file UTL_FILE.FILE_TYPE;
BEGIN
v_file := UTL_FILE.FOPEN (location => 'DUMP_DIR',
filename => 'emp_details.csv',
open_mode => 'w',
max_linesize => 32767);
FOR cur_rec IN c_data LOOP