Hi All,
I want ot create multiple file using utl_file.
EArlier i am write itng whole cursor records in one file.
But now the requirement is to split into multiple files when the cursor recrds exceeded 10000.
So the file will become two if it cross 10000 records amnd so on
if a cursor has 30000 records then i hould create 3 files.
Here is how i wrote the simple logic to write the whole records in to one table.
UTL_FILE.PUTF(file1, head);
utl_file.new_line(file1);
FOR vcur_torico_fetch IN cur_torico_fetch
LOOP
stmt :=''
||chr(9)||''
||chr(9)||vcur_torico_fetch.Application_classification
||chr(9)||''
||chr(9)||''
||chr(9)||vcur_torico_fetch.MY_COMP_CODE
||chr(9)||vcur_torico_fetch.OU_org_code;
utl_file.PUTF(file1, stmt);
utl_file.new_line(file1);
END LOOP;
utl_file.fclose(file1);
Kindly let me know the logic to achieve this.
Best Regards,