Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1080
  • Last Modified:

How to truncate a zip code from 9 digits to 5

Hello,

I am creating a make table query in MS Access 2007

I have a field with the zip code in it.  The zip code is 5 plus 4 so..all the data looks like this

305190000
300800000

how can I truncate this data in my query... I assume something like exp: [ZIP_CD]5

so that the data looks kike this

30519
30080

Thanks

FaithDan
0
FaithDan
Asked:
FaithDan
1 Solution
 
Surone1Commented:
left([ZIP_CD],5)
0
 
chadckuCommented:
Select substring(zip,1,5) as zipcode
0
 
FaithDanAuthor Commented:
Thats what I needed... worked perfectly
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
substring doesn't work in Access.

mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now