Hi, i rarely deal with PLSQL so any help would be greatly appreciated.
I need to run a query that will select all occurances where the status column of a table
is equal to true and then write this out to a file on the operating system.This is fine if there is only one record but often there will be multiple records.
My UTL file script to deal with 1 record is as below:
DECLARE
L_HANDLER UTL_FILE.FILE_TYPE;
vData VARCHAR2(85);
BEGIN
SELECT STATUS
INTO vDATA
FROM error_table;
L_HANDLER := UTL_FILE.FOPEN('MYDIR', 'error.txt', 'W');
UTL_FILE.PUTF(L_HANDLER, VDATA);
UTL_FILE.FCLOSE(L_HANDLER);
END;
Many thanks,
Adam