in reply to Re: Working with multiple records with different dates
in thread Working with multiple records with different dates

Thanks Ken that gets me closer, I didn't take into account the longest time spread may be different for different records.

example COMPANY ABCD 764200 E 2013,12,13 2013,12,19 COMPANY BCYX 156095 L 2013,11,30 2013,12,08

The first record has 6 days and the second 8 days. I need both records with any duplicates or shorter time span dates removed. I'm not sure if I am explaining this well. I need each unique record so if it exists only in 1 file then I use that date. If records exists in multiple files then the one with the longest time frame.

Any suggestions, I sure appreciate your time and expertise

Replies are listed 'Best First'.
Re^3: Working with multiple records with different dates
by kcott (Archbishop) on Jan 22, 2014 at 11:59 UTC
    "I'm not sure if I am explaining this well."

    I don't think you are.

    You say "The first record has 6 days and the second 8 days.". None of the three files you show have records like that. I wondered if you meant "file" instead of "record", but that leaves no mention of the the third file (which is the one with an 8 day time spread).

    My best guess is that you should process the files separately (perhaps storing interim data something like '$data_for_file{$file} = [ @wanted_record_data ]') and then extract the records you want after all files have been read.

    -- Ken