Home » Developer & Programmer » Forms » *** data transfer from .txt file to table ***
*** data transfer from .txt file to table *** [message #77940] Wed, 19 December 2001 18:53 Go to next message
Robin
Messages: 73
Registered: October 2001
Member
Exparts,
I can export data to a .lst file by spool command. But can not import data from that .lst file to table.How can I do it? Please help me.

thanks
robin.

----------------------------------------------------------------------
Re: *** data transfer from .txt file to table *** [message #77944 is a reply to message #77940] Thu, 20 December 2001 11:15 Go to previous messageGo to next message
Shilpa
Messages: 59
Registered: November 2001
Member
Try using sql loader

----------------------------------------------------------------------
Re: *** data transfer from .txt file to table *** [message #313469 is a reply to message #77940] Sat, 12 April 2008 13:48 Go to previous message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
hi mr robin
try this

DECLARE
OPEN_FILE Text_IO.File_Type;
LINE_VALUE VARCHAR2(80);
FILENAME VARCHAR2(10) :='C:XYZ.txt';

BEGIN
OPEN_FILE := Text_IO.Fopen(FILENAME, 'a');
LOOP
Text_IO.Get_Line(OPEN_FILE, LINE_VALUE);
Text_IO.Put(LINE_VALUE);

IF SUBSTR(LINE_VALUE,1,3) = 'CTR' THEN
INSERT INTO CONT VALUES(SUBSTR (LINE_VALUE,4,14));
END IF;
Text_IO.New_Line;
END LOOP;
COMMIT;

EXCEPTION
WHEN no_data_found THEN
SET_ALERT_PROPERTY
('MESS',ALERT_MESSAGE_TEXT,'FILE IS GOING TO CLOSE');
MESS;
Text_IO.Fclose(OPEN_FILE);

END;


owais





Previous Topic: How to auto populate a 2nd form from another form by using Global variable
Next Topic: moving the text item.
Goto Forum:
  


Current Time: Tue Dec 06 11:52:00 CST 2016

Total time taken to generate the page: 0.11848 seconds