fishpatrol
New Member
- Joined
- Apr 20, 2004
- Messages
- 25
I have two tab-delimited text files I'd like to compare. They're lists of products. The purpose of the comparison is to discover if any new products have been added to the list. Here are two samples from March 13th and 15th:
tta20140313.txt
tta20140315.txt
Between these two sample files, there are several differences. Several of the prices have changed: Not important. With the 8-digit IDs in Column A, there's one ID (334505972) that's present in the 0313 file that isn't in the 0315 file: Not important. There's also one ID (491001259) present in the 0315 file that isn't in the 0313 file: That's important! That ID in the newer file (by date) and the other data in its row is what I want to extract. I'd like the outcome of this comparison to be this:
The only wrinkle (that I'm aware of) is that the ID order is different from file to file. So a diff (or Compare.xla) will report lots of differences in the file, based on the order, that aren't of interest to me. I need a solution that disregards row order and finds IDs that are unique to the most recent file. Any ideas? Thanks
tta20140313.txt
Code:
775111882 2014-03-15 05:10:11 HD 10.99
604125993 2014-03-15 05:10:13 HD 19.99
555752861 2014-03-15 05:10:16 HD 14.99
365218396 2014-03-15 05:10:18 RD 19.99
334505972 2014-03-13 06:29:35 HD 34.99
273913609 2014-03-15 05:10:20 RD 19.99
385170051 2014-03-15 05:10:23 RD 8.99
357040155 2014-03-15 05:10:26 HD 19.99
723854213 2014-03-15 05:10:28 HD 23.99
256222865 2014-03-15 05:10:31 RD 19.99
499299827 2014-03-15 05:10:33 HD 19.99
366713030 2014-03-15 05:10:40 RD 29.99
tta20140315.txt
Code:
775111882 2014-03-15 05:10:11 HD 14.99
604125993 2014-03-15 05:10:13 HD 19.99
555752861 2014-03-15 05:10:16 HD 19.99
365218396 2014-03-15 05:10:18 RD 19.99
273913609 2014-03-15 05:10:20 RD 19.99
385170051 2014-03-15 05:10:23 RD 8.99
357040155 2014-03-15 05:10:26 HD 19.99
723854213 2014-03-15 05:10:28 HD 23.99
256222865 2014-03-15 05:10:31 RD 19.99
499299827 2014-03-15 05:10:33 HD 29.99
491001259 2014-03-15 05:10:36 RD 11.99
366713030 2014-03-15 05:10:40 RD 29.99
Between these two sample files, there are several differences. Several of the prices have changed: Not important. With the 8-digit IDs in Column A, there's one ID (334505972) that's present in the 0313 file that isn't in the 0315 file: Not important. There's also one ID (491001259) present in the 0315 file that isn't in the 0313 file: That's important! That ID in the newer file (by date) and the other data in its row is what I want to extract. I'd like the outcome of this comparison to be this:
Code:
491001259 2014-03-15 05:10:36 RD 11.99
The only wrinkle (that I'm aware of) is that the ID order is different from file to file. So a diff (or Compare.xla) will report lots of differences in the file, based on the order, that aren't of interest to me. I need a solution that disregards row order and finds IDs that are unique to the most recent file. Any ideas? Thanks