Robert,
Yes, you understand my dilemma.
I want to thank you for your keen insight. I didn't even thought of 
that.

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.

Thank you again for the advice.

JohnM

Robert Klemme wrote:
> John,
> 
> if I understand you correctly you have data in CSV files and you have
> a relational database.  You want to compare the content of those files
> with data already present in the database and edit the CSV data before
> importing it into the DB.
> 
> I do not know what your schema looks like nor what "comparing" in your
> case means, but did you consider first loading CSV data into the
> database using some staging table, doing the comparison and editing
> there and then copying the data over to the target location?  That way
> you can use the full power of SQL for comparison purposes.  And there
> are a lot of tools that allow to edit database data in tabular
> representation.
> 
> Kind regards
> 
> robert

-- 
Posted via http://www.ruby-forum.com/.