Sounds like a job for Perl.
Here's an example of cleaning up this data before you
send it to the database.
Really, this is much easier than doing it with PL/SQL or Java.
Jared
------------------------------------------
#!/usr/bin/perl
our %hashData;
while(<DATA>) {
my($key, @data) = split(/\s/);
if (defined($hashData{$key} ) ) {
$hashData{$key} .= ' ' . join(' ',@data);
} else {
$hashData{$key} = join(' ',@data);
}
}
foreach my $key ( sort keys %hashData ) {
print "Key: $key - |$hashData{$key}|\n";
}
__DATA__
100 Memo line 1 information.
100 more information for record 100.
100 extra information again.
200 Memo for 200.
200 more info for 200
300 info for 300
300 next memo
300 and more
300 yet more again.
------------------------------------------
On Thursday 17 May 2001 10:45, Glenn Travis wrote:
> I have a data file that looks like this;
>
> 100 Memo line 1 information.
> 100 more information for record 100.
> 100 extra information again.
> 200 Memo for 200.
> 200 more info for 200
> 300 info for 300
> 300 next memo
> 300 and more
> 300 yet more again.
>
> I want to load to a table (col1, infodesc) to look like this;
>
> col1 infodesc
> ------ ------------
> 100 Memo line 1 information. more information for record 100. extra
> information again
> 200 extra information again. Memo for 200. more info for 200
> 300 info for 300 next memo and more yet more again.
>
> Can this be done with sqlldr or do I need to load the data as is and use
> PL/SQL (and cursor loops) to concatentate the data?
>
> thanks for any help!
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jared Still
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).