From: Robert Klemme Date: 2009-08-19T00:19:43+09:00 Subject: Re: CSV import to hash to compare with database 2009/8/18 John Mcleod : > Yes, you understand my dilemma. > I want to thank you for your keen insight. I didn't even thought of > that. It may not be a viable solution in your case but it could be worthwhile to ponder. > When I say "compare", I mean a similarity comparison not an exact > comparison. > I installed 'amatch' gem. It has several comparison features that I > believe will benefit me. In particular, the Levenshtein distance. Two things come to mind: depending on the RDBMS you are using it may have similar tools (functions) for text processing and analysis. Depending on your requirements you can even write a database function that calculates Levenshtein Distance. Second, you could extract the data from the database via any of Ruby's database interfaces, do the comparison in Ruby code and write out results. Then, edit them and import the result back into the DB. > Thank you again for the advice. Your welcome! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/