Home » RDBMS Server » Server Utilities » SQL LODER - Single/Multiple csvs load Multiple tables
icon14.gif  SQL LODER - Single/Multiple csvs load Multiple tables [message #252896] Fri, 20 July 2007 09:24 Go to next message
ramesh.sadda
Messages: 2
Registered: July 2007
Junior Member
Hi,

required help urgent !!!!!!!!!

I have 3 different information in csv or txt file ( We can arrange in single file aswell) to load into 3 different tables. Provide me one control to do this job in Unix environment.

Content of these 3 files should be:

3 digit character --
File 1: old.txt - Content : 505
File 2: New.txt - Content : 575
File 3: affected:txt - Content : 200 233 240 260

Table should be like old , New ,affected with one field - npa

..

Thanks Inadvance

Regards,
Ramesh Babu Sadda
Re: SQL LODER - Single/Multiple csvs load Multiple tables [message #252914 is a reply to message #252896] Fri, 20 July 2007 10:56 Go to previous messageGo to next message
Michel Cadot
Messages: 68664
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First, nothing is urgent in forum even with a bunch of exclamation marks.

Quote:
Provide me one control to do this job in Unix environment

We don't do your job, we help you to do it.
Given the information you gave, we can't do so much.
Post what you already done or tried.
Post your Oracle version
Post the description of your table
Post everything that is relevant.

Regards
Michel
Re: SQL LODER - Single/Multiple csvs load Multiple tables [message #252918 is a reply to message #252914] Fri, 20 July 2007 11:04 Go to previous messageGo to next message
ramesh.sadda
Messages: 2
Registered: July 2007
Junior Member
Ok Thanks for your timely response, i am done by creating 3 different control files to load in to 3 different tables. which are as follows.

affected.ctl
LOAD DATA
INFILE affected.csv
BADFILE affectedbad.bad
INTO TABLE affected
(
nxx INTEGER EXTERNAL TERMINATED BY ""
)

new.ctl

LOAD DATA
INFILE new.csv
BADFILE newbad.bad
INTO TABLE NEW
(
nxx INTEGER EXTERNAL TERMINATED BY ""
)

splitting.ctl

LOAD DATA
INFILE splitting_npa.csv
BADFILE splitbad.bad
INTO TABLE SPLITTING
(
nxx INTEGER EXTERNAL TERMINATED BY ""
)


any possibilty of making these three into single sothat three tables should be loaded with three different files content.

Rightnow I mentioned in csv but if txt file means most helpful.

Thanks Inadvance,
Ramesh babu
Re: SQL LODER - Single/Multiple csvs load Multiple tables [message #252921 is a reply to message #252918] Fri, 20 July 2007 11:13 Go to previous message
Michel Cadot
Messages: 68664
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format.
Please always post your Oracle version (4 decimals).

First, I don't see the interest if you have 3 files each one loading one different tables to mix that.
Then to insert from one control file into several tables you must have a field in the data that allows the control file to know in which table it has to insert the data.
Finally, I didn't check it now but I don't think you can give several files to the loader.

Regards
Michel
Previous Topic: Exporting Schema with all the objects(no data)
Next Topic: Returning to this window.
Goto Forum:
  


Current Time: Sat Jun 22 21:30:33 CDT 2024