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 27 28 29 30
|
lobd BLOB;
fils BFILE;
v_name := 'o'||v_request_id||'.out';
BEGIN
SELECT replace(outfile_name,v_name,'')
INTO v_directory
FROM fnd_concurrent_requests
WHERE request_id = v_request_id;
fils := bfilename (v_directory,v_name);
select outfile
into lobd
from dtea_cra_resume2
where user_id = user_id_
and begin_date = to_date(v_from_date,'DD/MM/YYYY')
and end_date = to_date(v_to_date,'DD/MM/YYYY') for update;
dbms_lob.fileopen(fils/*,dbms_lob.file_readonly*/);
dbms_lob.loadfromfile(lobd,fils,dbms_lob.getlength(fils));
commit;
dbms_lob.fileclose(fils);
EXCEPTION
WHEN OTHERS THEN
FND_FILE.put_line(FND_FILE.OUTPUT,'Code erreur : '||to_char(SQLCODE));
FND_FILE.put_line(FND_FILE.OUTPUT,'libelle erreur : '||to_char(SQLERRM));
END; |