Community
Showing results for 
Search instead for 
Do you mean 
Reply

Query by zip code range

New Member
Posts: 2
Country: United States

Query by zip code range

I am trying to do an advanced query of all contacts within a certain zip code range (ie all contacts with zip codes starting with 10000 through 10199).   Can anyone suggest a way to do this?

 

Thank you.

 

Ed

Loyal Listener
Posts: 7
Country: United States

Re: Query by zip code range

Go to the advanced query. Set the field as zip, and set the operator as greater than or equal to your lowest zip, add to list, set the operator as lesser than or equal to your highest zip, add to list. Make sure it uses and insted of or in the query.

Platinum Elite Contributor
Posts: 6,651
Country: USA

Re: Query by zip code range

[ Edited ]
The ZIP code is a character field and you can't really do a numeric range query on a character field because the field is evaluated strictly from left to right. For the example you gave you could do Starts With 100 or 101. 
Message Edited by Roy_Laudenslage on 07-20-2009 10:19 AM
Roy Laudenslager
ACT! Certified Consultant
ACT! Report Expert
Durkin Impact Report Designer
www.techbenders.com
royel@techbenders.com
541-343-8129
Bronze Elite Contributor
Posts: 2,545
Country: New_Zealand

Re: Query by zip code range

How about: "| Contacts | Postcode | Starts With | 100 | OR | Contacts | Postcode | Starts With | 101 |"

 

 

Graeme Leo
Xact Software - consultants and developers
Follow us on Twitter and check out our Blog


Platinum Elite Contributor
Posts: 6,651
Country: USA

Re: Query by zip code range

Sorry that won't work, the ZIP code field is a character field.
Roy Laudenslager
ACT! Certified Consultant
ACT! Report Expert
Durkin Impact Report Designer
www.techbenders.com
royel@techbenders.com
541-343-8129
Bronze Elite Contributor
Posts: 2,545
Country: New_Zealand

Re: Query by zip code range

Worked for me

Graeme Leo
Xact Software - consultants and developers
Follow us on Twitter and check out our Blog


Platinum Elite Contributor
Posts: 6,651
Country: USA

Re: Query by zip code range


gleo wrote:
Worked for me
You didn't use a range search. 

 

Roy Laudenslager
ACT! Certified Consultant
ACT! Report Expert
Durkin Impact Report Designer
www.techbenders.com
royel@techbenders.com
541-343-8129
Bronze Elite Contributor
Posts: 2,545
Country: New_Zealand

Re: Query by zip code range

Thats's correct but derives the correct result

Graeme Leo
Xact Software - consultants and developers
Follow us on Twitter and check out our Blog


New Member
Posts: 2
Country: United States

Re: Query by zip code range

This does work; but you need a statement for each each 3 digit zip you want to include. For instance if you were searching for all zips between 10000 and 10999, you would need 10 steps. I hope that there is an easier way.

 

Thank you for your help.

 

Ed

Bronze Elite Contributor
Posts: 2,545
Country: New_Zealand

Re: Query by zip code range

Oh, you have a different question?

Graeme Leo
Xact Software - consultants and developers
Follow us on Twitter and check out our Blog