This should do it:
<cfset lowEnd=100>
<cfset highEnd=200>
<cfset listOfIDs="">
<cfloop from="#Variables.lowEnd#" to="#Variables.highEnd#" step="2"
index="i">
 <cfset listOfIDs=ListAppend(Variables.listOfIDs,i)>
</cfloop>
<cfquery name="tableUpdate" datasource="#Request.DSN#">
 UPDATE tablename
 SET column = 0
 WHERE ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER"
value="#Variables.listOfIDs#" list="Yes" separator=",">
</cfquery>


> -----Original Message-----
> From: Tony Carcieri [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 09, 2002 4:54 PM
> To: CF-Talk
> Subject: OT: SQL Question
> 
> 
> Hi all,
> 
> Here's what I want to do:
> UPDATE tablename
> SET column = 0
> WHERE ID = ???????
> 
> I want to specify a range of numbers (like 100-200) and 
> increment it by 2.
> So, 100, 102,104etc would only be updated and the rest wouldn't.
> 
> Any ideas?
> Thanks,
> T
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to