Home » Developer & Programmer » Forms » Load data from txt file and csv
Load data from txt file and csv [message #684505] Thu, 17 June 2021 02:59 Go to next message
haider_1pk
Messages: 135
Registered: March 2009
Location: PAKISTAN
Senior Member
Hello friends,

Kindly guide me how i can load data from txt or csv file in oracle forms.


abc.txt
s.no salary
1 4110
2 1000
3 5000

>PLEASE GUIDE ME HOW I CAN IMPORT DATA FROM ABC.TXT FILE.

Regards

Haider
Re: Load data from txt file and csv [message #684508 is a reply to message #684505] Fri, 18 June 2021 04:39 Go to previous messageGo to next message
Littlefoot
Messages: 21690
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option might be to use an external table. A form would then be used just like a nice GUI to do the job.
  • create a directory (Oracle object that points to a filesystem directory, which is usually located on a database server)
  • grant read (and write?) privilege(s) on it to use which will be using it
  • connected (in SQL*Plus or SQL Developer or any similar tool) as user who was granted privileges on a directory, create an external table
  • make sure it "works" (you can select from it)
  • create a stored procedure which will do the job - select from the external table and insert data into the target table
  • test the procedure
  • create a form whose data block is based on external table (so that you could see its contents)
  • put a button to the form and create a trigger which will call previously created stored procedure
  • test the form
Re: Load data from txt file and csv [message #684509 is a reply to message #684508] Fri, 18 June 2021 09:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68042
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You're very kind, Littlefoot, given his past behavior.
Re: Load data from txt file and csv [message #684510 is a reply to message #684509] Fri, 18 June 2021 16:09 Go to previous message
Littlefoot
Messages: 21690
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Ha! I forgot, but you - obviously - didn't Smile
Previous Topic: Files generated on server with sufix
Next Topic: Oracle forms
Goto Forum:
  


Current Time: Wed Dec 01 09:52:29 CST 2021