On Sat, 2006-10-28 at 08:59 -0600, Jack Daniels (Butch) wrote:
> I work with library cataloguing records and am trying to accomplish this 
> amazing feat.
> 
> Trying is no problem, amazing feat is eluding me
> 
> I need to find all records with the same ISBN number (field 020)save all 
> matching records which will result in more than 1 record with the same ISBN, 
> then somehow magically end up with only 1 record containing all 856 fields.

If there are not a huge number of isbn's then load a hash with an array
for each ISBN.  Then access each element of the hash loop through the
array through the different input streams and use business logic to
merge the two inputs.  Simplest approach is if field is empty use the
content provided.

More system oriented approach might be to write a quick parser of the
input files which adds the ISBN as the first key and a second key that
is the source.  sort all files together by ISBN then input files.  This
would allow you to prioritise where data comes.

This whole process can get very complex.  My work has megalithic
programs at work that merges direct mail address lists together.

-- 
Ken Foskey
FOSS developer


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to