Hello Experts!
I am relatively new to .NET and I'm trying my best to research my problems and fix them myself (which has worked a number of times). I truly believe that is the best way to learn. But this problem has me stumped.
Ultimately, I need to check for duplicate rows of data in a text field.
I planned to import the data from the text file into an array one row at a time, checking each new row with the entire array. When there is a match then error and stop import.
I've tried a bunch of different techniques: loops, arrays, importing data to a text box. No technique I found brings it all together.
First, is my approach the best way to handle this(array, import, compare)? Second I need as much help as you are willing to provide.
I don't really have any sample code that works right now, other than import data from a file to a text box.
Below is a sample of the data I'm trying to import and check. It consists of a header row (blue), then some data rows (the first 7 characters of the header and data row repeats). The data rows can be duplicates or even triplicate (see bold).
Again any help is greatly appreciated. If you need more information please let me know.
Thanks much - Walt
2330601A2330601 00160377770924200701062609272007030246N99RP 10012007 000199
2330601001A169764 00030014.700
2330601002S167032 00030004.920
2330601003S169647 00030004.920
2330601004S179846 00020009.480
2330601005A16091 00020019.530
2330601006S179820 00020009.480
2330601007S179818 00020009.480
2330601008S177761 00020009.480
2330601009S170656 00020009.480
2330601010S160894 00040004.080
2330601011S160898 00040004.080
2330601012S160895 00040004.080
2330601013S160899 00040004.080
2330601014A493524 00040018.879
2330601015A257723 00010044.100
2330601016A269874 00010029.400
2330601017S36887 00020004.800
2330601018S361973 00020004.800
2330601019S36031 00020004.800
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601032A679658 00010008.715
2330601033A190043 00010017.430
2330601034A280000 00010014.700
2330601035A289651 00010007.350
2330601036A129903 00010009.450
2330601037A679652 00010020.685
2330601038A679651 00010020.685
2330601039A679650 00010020.685
2330601040A455330 00010014.700
2330601041A129902 00010009.450
2330601042A127070 00010025.200
2330601043A120016 00010010.500
2330601044A288280 00010007.350
2330601045A129801 00010009.450
2330601046A121054 00010033.600
2330601047A199654 00010006.720
2330601048A13004 00010012.075
2330601049A13005 00010012.075
2330601050A229654 00010018.165
2330601051A289643 00010007.350
2340601A2330601 00160377770924200701062609272007030246N99RP 10012007 000199
2340601001A169764 00030014.700
2340601002S167032 00030004.920
2340601003S169647 00030004.920
2340601004S179846 00020009.480
2340601005A16091 00020019.530
I am relatively new to .NET and I'm trying my best to research my problems and fix them myself (which has worked a number of times). I truly believe that is the best way to learn. But this problem has me stumped.
Ultimately, I need to check for duplicate rows of data in a text field.
I planned to import the data from the text file into an array one row at a time, checking each new row with the entire array. When there is a match then error and stop import.
I've tried a bunch of different techniques: loops, arrays, importing data to a text box. No technique I found brings it all together.
First, is my approach the best way to handle this(array, import, compare)? Second I need as much help as you are willing to provide.
I don't really have any sample code that works right now, other than import data from a file to a text box.
Below is a sample of the data I'm trying to import and check. It consists of a header row (blue), then some data rows (the first 7 characters of the header and data row repeats). The data rows can be duplicates or even triplicate (see bold).
Again any help is greatly appreciated. If you need more information please let me know.
Thanks much - Walt
2330601A2330601 00160377770924200701062609272007030246N99RP 10012007 000199
2330601001A169764 00030014.700
2330601002S167032 00030004.920
2330601003S169647 00030004.920
2330601004S179846 00020009.480
2330601005A16091 00020019.530
2330601006S179820 00020009.480
2330601007S179818 00020009.480
2330601008S177761 00020009.480
2330601009S170656 00020009.480
2330601010S160894 00040004.080
2330601011S160898 00040004.080
2330601012S160895 00040004.080
2330601013S160899 00040004.080
2330601014A493524 00040018.879
2330601015A257723 00010044.100
2330601016A269874 00010029.400
2330601017S36887 00020004.800
2330601018S361973 00020004.800
2330601019S36031 00020004.800
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601020A36138 00020010.920
2330601021S37140.90 00020004.800
2330601022S369874 00020004.800
2330601023S367198 00020004.800
2330601024A129095 00020010.500
2330601025A679090 00010007.140
2330601026A170685 00010006.258
2330601027A170686 00010006.258
2330601028A279647 00020005.670
2330601029A249646 00010010.710
2330601030A229650 00010009.030
2330601031A229651 00010009.030
2330601032A679658 00010008.715
2330601033A190043 00010017.430
2330601034A280000 00010014.700
2330601035A289651 00010007.350
2330601036A129903 00010009.450
2330601037A679652 00010020.685
2330601038A679651 00010020.685
2330601039A679650 00010020.685
2330601040A455330 00010014.700
2330601041A129902 00010009.450
2330601042A127070 00010025.200
2330601043A120016 00010010.500
2330601044A288280 00010007.350
2330601045A129801 00010009.450
2330601046A121054 00010033.600
2330601047A199654 00010006.720
2330601048A13004 00010012.075
2330601049A13005 00010012.075
2330601050A229654 00010018.165
2330601051A289643 00010007.350
2340601A2330601 00160377770924200701062609272007030246N99RP 10012007 000199
2340601001A169764 00030014.700
2340601002S167032 00030004.920
2340601003S169647 00030004.920
2340601004S179846 00020009.480
2340601005A16091 00020019.530