Originally Posted by
Rick Rothstein
I am not sure that there is a coded solution to your problem. Why? Among other things, because your data is not delimited well. The first problem I saw was a change in text description. Your Main File starts each cars description with "Mercedes model" whereas your Actual File shows you want that part to read Merceds Benz. I don't know what other car brands there may be, but to handle the switch in text, we would need to have a list of all possible starting text from the Main File and the equivalent text you want to use for it. That is probably doable since I'm sure the number of car brands is relatatively short. The big problem with your data, though, is the lack of any delimiters within the description itself. For example, consider these two lines from your Main File...
Mercedes model - 300CE Convertible 24 Valve E Class 124.051 104.980 from 1990-1992
Mercedes model - 300SL SL Class 129.061 104.981 from 1990-1993
The problem I am having is figuring out how to isolate the part I have highlighted in red. Obviously, it starts after the dash, but I see no "for sure" way to determine where it ends. I'm thinking maybe if there is a number, it is always first, so perhaps I can end at the next number I come to... that would work for the above. But then I wonder about this item which you did not give a "translation" for...
Mercedes model - 190E 2.3 201.024 102.985 from 1984-1986
Would the 2.3 belong with the 190E or with the 201.024etc. part? Perhaps if you answer that question and, if the 2.3 goes with the 201.024etc. part, then could provide some more examples of real data and their translation so we can get a feel for the variety of data you have to deal with?
Bookmarks