|
Re: how to create a txt file from PL/SQL procedure [message #341278 is a reply to message #341269] |
Mon, 18 August 2008 02:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gurupatham
Messages: 66 Registered: March 2008 Location: Chennai
|
Member |
|
|
You Can use Text_Io package to create text file in front end. In Stored procedure we can use utl_file package.
Ex:
Declare
out_File Text_Io.File_Type;
begin
out_File := Text_Io.FOpen('C:\test.txt' , 'W');
Text_Io.Put_Line(out_file , 'Hi this is text file!');
Text_Io.FClose(out_file);
end;
|
|
|
|
|
Re: how to create a txt file from PL/SQL procedure [message #341336 is a reply to message #341269] |
Mon, 18 August 2008 07:20 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gurupatham
Messages: 66 Registered: March 2008 Location: Chennai
|
Member |
|
|
Given Example does not work in database environment(Stored Procedure). it Works only in form.
For Stored Procedure Use utl_File Package .
Ex:
Declare
out_File Utl_File.File_Type;
begin
out_File := Utl_File.FOpen('Dir' , 'test.txt' , 'W');
Utl_File.Put_Line(out_file , 'Hi this is text file!');
Utl_File.FClose(out_file);
Exception when others then
Dbms_output.Put_line(Sqlerrm||'-------'||Sqlcode);
end;
[Updated on: Mon, 18 August 2008 07:22] Report message to a moderator
|
|
|
|
|
|
|
|