Jalcock501 has asked for the wisdom of the Perl Monks concerning the following question:
I know that I am meant to show my working however I have none because I cannot find anywhere that can help me with this issue, so I have come to you (the monks) cap in hand to plead for your help.
I have 2 files which have a common field that need to be joined together.As you can see with the data, there are some fields in file 2 that are not in file1, I need to be able to join both of the second fields together to form a new .csv in this format.File1: 70000004 12008401 70000005 52003402 70000007 17527802 70000008 95050962 70000011 50010101 70000012 17576901 70000013 07072701 70000014 52010201 70000015 35555501 70000017 53561503 70000018 40500304 70000019 35513607 70000021 41548701 70000022 54644601 70000022 95050682 File2: 70000004 00 70000005 25 70000007 25 70000008 31 70000008 31 70000009 34 70000010 21 70000011 21 70000012 17 70000013 47 70000014 19 70000015 43 70000017 20 70000018 15 70000019 11
The key fields (field 1 in both files) are to be removed after merging as they are no longer required. Any entries that do not match file1 are to be removed. I looked at just pasting the files together but it is too clumsy for what I need to achieve.00000000,00
If someone could please help as I am at my wits end
ThanksJim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Merge 2 files using key field
by Limbic~Region (Chancellor) on Nov 05, 2013 at 13:15 UTC | |
|
Re: Merge 2 files using key field
by Corion (Patriarch) on Nov 05, 2013 at 12:17 UTC | |
|
Re: Merge 2 files using key field
by LanX (Saint) on Nov 05, 2013 at 12:02 UTC | |
|
Re: Merge 2 files using key field
by marinersk (Priest) on Nov 05, 2013 at 17:29 UTC | |
by Jalcock501 (Sexton) on Nov 11, 2013 at 09:15 UTC |