Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

exporting data into text file

dmarinov87Oct 29 2012 — edited Oct 29 2012
Hi!

I use this process in apex to export data from table into txt files with fixed length, so without any delimeter
>
declare
v_file_name VARCHAR2 (2000) := 'test.txt';
id varchar2(9);
worker varchar2(30);
address varchar2(26);
begin

OWA_UTIL.mime_header ('application/txt', FALSE);
htp.p('Content-Disposition:attachment;filename="'|| v_file_name|| '"');
OWA_UTIL.http_header_close;

FOR x in (select id id from workers where col00 like '1000')
LOOP
select col01,col02,col03 into id, worker, addressfrom un_web_prenosi where id = x.id;
htp.p(id||worker||address);
END LOOP;
apex_application.g_unrecoverable_error:=true;
exception when others then
null;
end;
and I have problem, because if I open file with notepad is everything in one line, but if I open file in notepad++ or I copy content of file in word then I see contents just like it should be (each record in one line). Do you know how can I solve this problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2012
Added on Oct 29 2012
1 comment
840 views