cancel
Showing results for 
Search instead for 
Did you mean: 

Sql Loader Help

Rajkumar_3
Regular Advisor

Sql Loader Help

Hai All,

I have a text file which contains the data to be inserted into table called INFO..

I have attached that txt file for reference.
I want to insert the data into the following table INFO into 6 different columns

Create table info
(a number,
b number
c number
d number
e number
f number);

For Eg:
-----------

4 2 120 106 24.07 43
442 2 106 104 20.49 35

using SQL LOADER

Any help is Appretiated..

B/Regds
Raj
Oracle DBA
3 REPLIES
Thierry Poels_1
Honored Contributor

Re: Sql Loader Help

Hi,

how about first processing this file through sed or awk, and replacing all '->' and ':' by whitespace?? Afterwards you can use a very simple sql loader control file (fields seperated by whitespace).

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Rajkumar_3
Regular Advisor

Re: Sql Loader Help

Hai,

Thank you for your reply..Presently this database is running on NT.

Is there any alternative method???

B/Regds
Raj
Oracle DBA
Thierry Poels_1
Honored Contributor

Re: Sql Loader Help

hi,
how about a perl script then ?

You could try this, I'll use the '>' as a separator, and consider the '-' as a negative sign, and then use its absolute value:

LOAD DATA
INFILE 'yourfile'
APPEND
INTO TABLE info
FIELDS TERMINATED BY whitespace
(a integer external terminated by '>' "abs(:a)" ,
b,
c terminated by ':',
d,
e,
f)

hmmm, not sure about the whole syntax, but gives you something to play with :)

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.