Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1057
  • 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 MVP, Access and Data Platform)Commented:
substring doesn't work in Access.

mx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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