I have to create a CSV file on a nightly process and avail those files to client as an http download.
I have created a CSV with the help PLSQL block as:
DECLARE F UTL_FILE.FILE_TYPE; CURSOR C1 IS SELECT emp_id, name FROM employee; C1_R C1%ROWTYPE; BEGIN F := UTL_FILE.FOPEN('EXPORT_DIR','employee.csv','w',32767); FOR C1_R IN C1 LOOP UTL_FILE.PUT(F,C1_R.emp_id); UTL_FILE.PUT(F,','||C1_R.name); UTL_FILE.NEW_LINE(F); END LOOP; UTL_FILE.FCLOSE(F); END; / this will create a CSV file "employee.csv" on the database server. Now I have to avail this file to the clients as a HTTP downloadable file. How to do that ?