You can make use of UTL_FILE oracle package.
example;
create or replace procedure write_sample
is
fh utl_file.file_type;
i number(4);
begin
fh := utl_file.fopen('/tmp/test.dat','test','w');
for rec in (select field1 from table1) loop
utl_file.put_line(fh,rec.field1);
end loop;
utl_file.fclose(fh);
end;
/
Robbie
"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War