From: Hassan Schroeder Date: 2010-12-28T03:12:49+09:00 Subject: Re: Find not working On Mon, Dec 27, 2010 at 9:30 AM, Shandy Nantz wrote: > My query looks a little something like this: > > @finduser = User.find(:first, :conditions => ['upper(username) = ?', > x[11].to_s.upcase]) > x[11] is the field in my csv file that has the  username, other then > that this is a simple script, but the user is never being found even > though ActiveRecord has the correct host and adapter information. My > question is there anyway to output the query string from my object or > the query that is being built? Does the DB you're using have a log? (MySQL does, so you can see the queries generated directly.) You could also use print statements or a debugger to confirm that the value of x[11].to_s.upcase is what you think it is. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com twitter: @hassan