Solved

How to truncate a zip code from 9 digits to 5

Posted on 2010-09-09
4
1,010 Views
Last Modified: 2012-08-13
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
Comment
Question by:FaithDan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 13

Accepted Solution

by:
Surone1 earned 500 total points
ID: 33639337
left([ZIP_CD],5)
0
 
LVL 1

Expert Comment

by:chadcku
ID: 33639346
Select substring(zip,1,5) as zipcode
0
 
LVL 1

Author Closing Comment

by:FaithDan
ID: 33639359
Thats what I needed... worked perfectly
0
 
LVL 75
ID: 33639361
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question