Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert text field to number field in query but leav as text inthe tbl

Status
Not open for further replies.

DBritter

Technical User
Joined
Jun 28, 2000
Messages
37
Location
US
I am in the process of creating a lead database for my company. The problem is that the zip field is text due to international zips having letters.
I would like to create a set of queries to route the US leads to our US reps. The reps have a specific geographic area basedd on a zip range. It is not be a problem to isolate the leads located in the USA, but how do I convert the zip to an integer in order to check if it falls into a particular zip range. Or do I need to convert it at all.
[sig][/sig]
 
DBritter,

There should be no need to convert the "Postal Code" to numeric. The correct sorting should occur on the text values of the numeric codes. In fact conversion to numeric can introduce some difficulties, as the leading zeroes for the New England area will be dropped.

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top