Import text file in oracle 9i [message #505500] |
Tue, 03 May 2011 06:49 |
sonia.ali
Messages: 40 Registered: April 2009 Location: Pakistan
|
Member |
|
|
Hello All,
I want to import text from text file. Kindly guide how i can import in oracle forms ( oracle 9i)
Thanks and regards
Sonia Ali
|
|
|
|
|
Re: Import text file in oracle 9i [message #505640 is a reply to message #505637] |
Wed, 04 May 2011 06:50 |
oralover2006
Messages: 144 Registered: January 2010 Location: India
|
Senior Member |
|
|
sonia.ali wrote on Wed, 04 May 2011 17:04Hello Friends,
Kindly make the Example in Hr Schema.How to import text .
Thanks
Sonia ALi
here is an example, not of HR Schema, its simple to understand...
PROCEDURE test_file_contents IS
input_file Text_IO.File_Type;
linebuffer VARCHAR2(200);
BEGIN
input_file := Text_IO.Fopen('test.txt','r'); -- notice 'r' for Read file
Loop
Text_IO.Get_Line ( input_file, linebuffer );
Text_IO.Put ( Linebuffer );
Text_IO.New_LIne;
End Loop;
EXCEPTION
WHEN no_data_found THEN
Text_IO.Put_Line('Closing file...');
Text_IO.Fclose( input_file );
END;
i think it will help.
|
|
|
Re: Import text file in oracle 9i [message #505811 is a reply to message #505640] |
Thu, 05 May 2011 02:18 |
sonia.ali
Messages: 40 Registered: April 2009 Location: Pakistan
|
Member |
|
|
Hello Friend,
Thank you very much to your reply. Dear Sorry to say you. I new comer in oracle. I have been read text_io package in oracle 10g .Its working in oracle 10g.
But I could not understand in oracle 9i. So kindly completely guide me how I can run in oracle 9i.
Thanking you.
Sonia ALi
|
|
|
|
Re: Import text file in oracle 9i [message #505825 is a reply to message #505819] |
Thu, 05 May 2011 03:32 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
text_io works in oracle 9. In fact it works with oracle 8. It's a forms package not a DB one so the DB version doesn't matter.
If you want to do it with a DB package use utl_file or sqlloader.
|
|
|
Re: Import text file in oracle 9i [message #505900 is a reply to message #505825] |
Thu, 05 May 2011 09:36 |
oralover2006
Messages: 144 Registered: January 2010 Location: India
|
Senior Member |
|
|
cookiemonster wrote on Thu, 05 May 2011 14:02text_io works in oracle 9. In fact it works with oracle 8. It's a forms package not a DB one so the DB version doesn't matter.
If you want to do it with a DB package use utl_file or sqlloader.
as she ask to import with oracle forms 9i, it works, if not try using CLIENT_TEXT_IO instead TEXT_IO.
sonia ali, please clarify your problem/need in some detail here, what actually want to do with it ?
|
|
|