extract table using utl_file
445042Feb 21 2013 — edited Feb 21 2013Hi aces,
I'm trying to extract a table to a linux file.
This is the code I'm executing and the error I get :
create or replace directory repr_utl_dir AS '/home/oracle';
GRANT read, write ON DIRECTORY repr_utl_dir TO sys;
declare
f utl_file.file_type;
begin
f := utl_file.fopen('repr_utl_dir','repr.txt','W');
for s in (select * from repr)
loop
utl_file.put_line(f,s);
end loop;
utl_file.fclose(f);
end;
/
ERROR at line 7:
ORA-06550: line 7, column 1:
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
ORA-06550: line 7, column 1:
PL/SQL: Statement ignored
Any ideas please ?