From: Robert Klemme Date: 2009-08-18T23:44:48+09:00 Subject: Re: CSV import to hash to compare with database 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 -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/