Tony and Matt are right on target...I've seen a lot of people store
zips / postal codes as non-numeric types (nvarchar, etc) to account
for non-us postal codes, in which case you'll want to do something
like this:

dealer_zip in (#listQualify(returnedZIPs, "'")#)

-joe



On Mon, 25 Oct 2004 21:18:13 -0400, Tony Weeg <[EMAIL PROTECTED]> wrote:
> :) its alright.
> 
> you cant do what your trying to do... not like that... however you
> could do something like this...
> 
> <cfquery name="qry_getdealers" datasource="="#Application.DSN#">
>      Select *
>      from
>      DealersWhere
>      dealer_zip in (#ReturnedZIPs#)
> </cfquery>
> 
> hth
> tony
> 
> On Mon, 25 Oct 2004 20:53:28 -0400, Jeff Fongemie
> <[EMAIL PROTECTED]> wrote:
> > What's wrong with this code?
> >
> > <cfquery name="qry_getdealers" datasource="#Application.DSN#">
> > Select * from Dealers
> > Where
> > <cfloop index="zip" LIST="#ReturnedZIPs#" DELIMITERS=",">
> > dealer_zip ='#zip#' or
> > </cfloop>
> > </cfquery>
> >
> > I get a list of zipcodes. I need to get all the dealers that have match any one of 
> > zipcodes from my list.
> >
> > I must be missing something simple!
> >
> > -Jeff
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=34

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182563
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to