Converting ZIP codes

  • Thread starter Thread starter Kirk
  • Start date Start date
K

Kirk

Hello,

Small (and dumb I'm sure) question. If I have ZIP code
fields I wanted limited to five digits, how do I replace 9
digit records with just the first 5? Also, if I have
Canadian postal codes (alphanumeric, not just numeric),
how do I prevent those records from being changed?
 
It is better if you have the zip code as characters (text), not digits.
Some zip codes have leading zeros which need to be present.

To get the first 5 characters, you can use the LEFT() function.

As for non-U.S. zip codes, I would suggest having some kind of flag that
distinguishes between U.S. and non-U.S. so that you can handle accordingly.

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top