From: "David A. Black" Date: 2008-06-16T14:10:39+09:00 Subject: Re: ruby string format kicks in when doign wild card in activerecord Hi -- On Mon, 16 Jun 2008, Junkone wrote: > when i use the place holder ? the acticerecord creates a bad sql. > Rawdata.find(:all, :conditions=>["processed_indicator is NULL and > symbol not in (select distinct r.symbol from rawdatas r > WHERE r.executionecn like ? or r.executionecn like ?",'%IDEAL > %','%FX%']) > is the actual definition. it produces an sql like this where it opens > a bracket for the inner select but fails to close it correctly. You've opened it, so try closing it yourself. David -- Rails training from David A. Black and Ruby Power and Light: ADVANCING WITH RAILS June 16-19 Berlin ADVANCING WITH RAILS July 21-24 Edison, NJ See http://www.rubypal.com for details and updates!