SQL*Loader - multiple line load - HELP!! [message #368242] |
Tue, 10 October 2000 07:13 |
Martin Johansson
Messages: 11 Registered: October 2000
|
Junior Member |
|
|
Hi..
I want to load multiple lines in a file a ONE row in the database. Different rows in the file should be loaded into different columns in the database.
Example:
File to load:
Value1 -> to line1 column1 in the DB
Value2 -> to line1 column2 in the DB
Value3 -> to line1 column3 in the DB
Value4 -> to line1 column4 in the DB
Please help
/Martin
|
|
|
Re: SQL*Loader - multiple line load - HELP!! [message #368243 is a reply to message #368242] |
Tue, 10 October 2000 11:37 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi,
Do you have a fixed length or variable length records.
If you have fixed length you can ask sqlldr to continue till the end of physical record(in your ex its end of 4th line)
Or you can load the data into a work table with two columns value and id.
like this:
load data
infile c:\data.txt
append into work_table
(value ,
id sequence(1, max))
The id column will have serial numbers from 1 to max_no_of_records.
And write a proc to insert the data from work_table to the perm_table.
(load value into col1 where id = 1, 5, 9 etc....)
Good luck
Bala
|
|
|
Re: SQL*Loader - multiple line load - HELP!! [message #368247 is a reply to message #368242] |
Fri, 13 October 2000 16:15 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi ,
This is a followup of my followup.
Actually if you have fixed number of physical
records to form a logical, you can use concatenate n command.
in control file
load data
infile ......
concatenate 4
Hope you would have already figure that out,
in case.....
Thanks
Bala
|
|
|