It failed because with cfqueryparam you're binding thousands of variables into the statement as parameters, which is a Very Bad Thing (TM).
If it's all against the same DB, use a subquery for your IN clause. It should perform much better than either of the current solutions. On Tue, Sep 16, 2008 at 7:32 AM, Les Mizzell <[EMAIL PROTECTED]> wrote: >> I don't see where you specified the database you're using, but SQL Server >> will allow a limit of 2,100 records be used in the IN statement. > > It is SQL server. > > But, why did CFQUERYPARAM fail, and this works: > > WHERE ml_id IN > (<cfoutput query="getGROUP"> > <cfif getGroup.CurrentRow NEQ 1>,</cfif> > #ml_id# > </cfoutput>) > > ....which really looks like a disaster getting ready to happen to me. > > > But, this was originally designed a couple of years ago to handle small > list, and suddenly the client is really pushing it (...and I'm stupid > for not planning ahead - I know, I know...). > > I'll end up rewriting is as a view in the database, more than likely. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312557 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

