From: Brian Candler Date: 2010-12-28T06:25:42+09:00 Subject: Re: Find not working Shandy Nantz wrote in post #970912: > @finduser = User.find(:first, :conditions => ['upper(username) = ?', > x[11].to_s.upcase]) puts x[11].to_s.upcase.inspect If x[11] is the last column in the CSV, you might find it has an unexpected \n at the end. If so, you can chomp it off. I guess this is not mysql, since mysql does case-insensitive comparisons by default, so there's no need for an upper() conversion Beware: in other databases, you might find that the upper() conversion defeats indexing of the column, so you could end up with a very inefficient full table scan. Try an "explain plan" or equivalent to see. -- Posted via http://www.ruby-forum.com/.