Oracle - escribir en fichero

 
Vista:

escribir en fichero

Publicado por mario (23 intervenciones) el 17/03/2005 16:29:44
hola a todos
necesito escribir en un txt desde forms creo que se hace con text_io pero no se como me puede ayudar alguien? por favor
gracias de antemano
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:escribir en fichero

Publicado por REduardo (8 intervenciones) el 22/03/2005 22:54:18
alli va un ejemplo:
PROCEDURE Genera_Txt IS
out_file Text_IO.File_Type; --txt con los comandos
v_linea VARCHAR2(2000); --contiene el insert a latabla
v_nombre_file VARCHAR2(60);
v_primero BOOLEAN := True;
BEGIN
v_nombre_file := 'c:\temp\namefile.txt';
out_file := Text_IO.Fopen(v_nombre_file, 'w');
loop
if v_primero then
v_linea := 'titulo';
Text_IO.Put_Line(out_file, v_linea);
end if;
v_primero := FALSE;
v_linea := ' linea ';
Text_IO.Put_Line(out_file, v_linea);
exit when :system.last_record = 'TRUE';
end loop;
text_IO.Fclose (out_file);
END;

claro habria que adaptarlo a tus necesitades (tablas y campos)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar