Assuming the list is of decent size, it is significantly faster to convert it to an array. The function ListGetAt() is quite slow.
-Matt > -----Original Message----- > From: brook [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 05, 2002 3:24 PM > To: CF-Talk > Subject: RE: Where Columname IN-Question ! > > What is the point of converting this list to an array? Why not just to the > same thing with the original list? > > > At 11:54 AM 5/5/02 -0700, you wrote: > ><cfset makes = ListToArray(url.makes)> > ><cfquery> > > SELECT make, reportYear, rating, comments > > FROM carReportsTable > > WHERE make = makes[itr] > > <cfif ArrayLen(makes) gt 1> > > <cfloop index="itr" from="2" to="#ArrayLen(makes)#"> > > AND make = makes[itr] > > </cfloop> > > </cfif> > ></cfquery> > > > >-Matt > > > > > -----Original Message----- > > > From: cf-talk [mailto:[EMAIL PROTECTED]] > > > Sent: Sunday, May 05, 2002 11:48 AM > > > To: CF-Talk > > > Subject: OT: Where Columname IN-Question ! > > > > > > Hi list, in my CFM Page I have a SQL-statement similar like following: > > > > > > .. > > > SELECT make, reportYear, rating, comments > > > FROM carReportsTable > > > WHERE make IN (#url.makes#) > > > .. > > > > > > url.makes give me a list of items like: > > > > > > item1, item2, item3... > > > and those are coming from a checkbox called "makes" with values like > > > item1,item2,item3 (of a caller cfm-template). > > > The statement > > > "WHERE make IN (url.makes)" is like a short version of > > > "Where make = item1 OR make = item2 OR make = item3..." > > > How can I change this OR to an AND ? > > > Is there a certain (different ?) SQL-function for this ? > > > > > > Thanks > > > > > > Uwe > > > > > > > > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

