Hello all
I am using Oracle XE 18c,Tomcat 9, ORDS 19.2.0.r1991647 and APEX 20.1 all on a single Windows 10 machine.
I have created two procedures. The first uses UTL_FILE to write the results of select * from emp to a csv file. The second is similar except it writes the results of select * from dept. The filenames are made up of the table name and todays date eg emp_26-JUN-2020.csv and dept_26-JUN-2020.csv When I run the following anonymous block from SQL*Developer:
begin
emp_proc;
dept_proc;
end;
they work fine and I end up with the two files, right names and correct data inside them.
In APEX I have created a single button on a page that when clicked runs a plsql process with the same anonymous block as above. I don't get any errors - I only get
one file that is always called 2020.csv. The data inside the file is always the last procedure ie the dept table. What am I missing here please? I am assuming that for some reason the filename is getting lost or shortened and as it is the same the second procedure over writes the results in it.
Any help greatly appreciated
Helen