Copie Incomplète avec FCOPY
Voilà ce qui se passe.
je crée un fichier dans un script sql et lorsque je copie le fichier créer il est couper à la 144ème ligne.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
DECLARE
f_ utl_file.file_type; --: file
-- Cursor declaration
/**2 CURSOR ARE CREATE **/
BEGIN
-- open the file to write the daily inventory part
f_ := utl_file.fopen(source_dir_, source_file_, 'W');
-- get the information from the 2 cursor and write all the lines in the file
--write the Header
--write all the lines to create the daily inentory part in a LOOP--
FOR rec_ IN daily_inventory_part_ LOOP
/** ... **/
--write the current line in the current created file
UTL_FILE.PUT_LINE(f_, str_line_);
END LOOP;
--COPY the file
UTL_FILE.FCOPY (source_dir_, source_file_, target_dir_, target_file_);
--close the file
UTL_FILE.FCLOSE(f_);
END; |
Il y a t'il une erreur dans ma façon d'appeler FCOPY ? dois ajouter d'autre paramètre ?
Merci d'avance
simplement faire le FCLOSE avant le FCOPY
il fallait tout simplement faire le FCLOSE avant le FCOPY
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
DECLARE
f_ utl_file.file_type; --: file
-- Cursor declaration
/**2 CURSOR ARE CREATE **/
BEGIN
-- open the file to write the daily inventory part
f_ := utl_file.fopen(source_dir_, source_file_, 'W');
-- get the information from the 2 cursor and write all the lines in the file
--write the Header
--write all the lines to create the daily inentory part in a LOOP--
FOR rec_ IN daily_inventory_part_ LOOP
/** ... **/
--write the current line in the current created file
UTL_FILE.PUT_LINE(f_, str_line_);
END LOOP;
--close the file
UTL_FILE.FCLOSE(f_);
--COPY the file
UTL_FILE.FCOPY (source_dir_, source_file_, target_dir_, target_file_);
END; |