ooh that's better than mine. cfqueryparam for the win. On 8/24/07, Aaron Rouse <[EMAIL PROTECTED]> wrote: > Assuming zip in the database is number field then it should work without the > single quotes around the variable. I would use a cfqueryparam though: > > WHERE ZIP IN (<cfqueryparam value="#Variables.ReturnedZIPS#" > cfsqltype="cf_sql_numeric" list="yes" />) > > On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > I forget how to do this. ReturnedZIPs is a variable with comma delimted > > zip codes. > > I tried valuelist and got an error. Any help would be great thanks. > > > > <cfquery name="get_stores" datasource="#datasource#"> > > select * > > from tblstores_import > > where zip IN ('#ReturnedZIPs#') > > </cfquery> > > > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287084 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4