Loading with modification [message #69637] |
Tue, 12 February 2002 02:07 |
diaz
Messages: 58 Registered: October 2001
|
Member |
|
|
hi,
i want to load file that contain this :
628111234567 12345
628111234568 10000
to a table with field
id varchar(10)
budget number(5)
the first column is id, and the second is budget
you see that in the first column there are 12 characters and i want to exclude the first two characters ...
so the table will contain this :
id budget
---------- ------
8111234567 12345
8111234568 10000
what should i do ?
thanks
|
|
|
Re: Loading with modification [message #69639 is a reply to message #69637] |
Tue, 12 February 2002 09:06 |
INTROV
Messages: 20 Registered: February 2002
|
Junior Member |
|
|
Create a control file like
LOAD DATA
INFILE 'testdata.txt'
BADFILE 'testdata.bad'
DISCARDFILE 'testdata.dsc'
INTO TABLE your_table
(
ID POSITION (3:12) INTEGER EXTERNAL,
BUDGET POSITION (14:18) INTEGER EXTERNAL
)
Declare integer provided if the data is numeric. Also check the start and end position number of the data and change accordingly in the position.
Then run the sqlldr utility to load the data.
|
|
|