Loading variable and fixed data [message #291036] |
Wed, 02 January 2008 16:19 |
marydvu
Messages: 4 Registered: January 2008
|
Junior Member |
|
|
How can i load these records properly if only the first 2 fields are fixed and the rest are variable? I can't use the TERMINATED BY clause anywhere.
Sample Data:
SANDRA----BULLOCK--MISS CONGENIALITY------ACTRESS
WILL------SMITH----I AM LEGEND--ACTOR
Control File:
.
.
.
INTO TABLE CELEBRITY
(
fname position(1:10) char,
lname position(11:30) char,
movie ??
Profession ? ?
)
THanks,
Mary
|
|
|
|
Re: Loading variable and fixed data [message #291038 is a reply to message #291036] |
Wed, 02 January 2008 16:39 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Can you describe (using your own words) how to extract movie and profession? If so, it can probably be coded in (PL/)SQL. In order to be able to do that, either load the whole file into a temporary table or use an input file as an external table and write that piece of (PL/)SQL code against it.
Sample data you provided suggests that first and last name are fixed, profession is only one word, so - movie title must be the rest which is left in between.
If you, however, don't know how to extract it, Houston, we have a problem.
|
|
|
|
|
|
|
|
|