Left function in Access

  • Thread starter Thread starter Slimmyy
  • Start date Start date
S

Slimmyy

I have a list of Zip codes, some have the +4 and some do not. I am trying to
show the left 5 numbers (i.e. only the zip code, not the +4) in a column
using the left function. I know how to do it with a specific string, but this
list has 90,000+ records and I cannot do it for each zip code individually.
Can anyone help?

Thanks!

Lee
 
I have a list of Zip codes, some have the +4 and some do not. I am trying to
show the left 5 numbers (i.e. only the zip code, not the +4) in a column
using the left function. I know how to do it with a specific string, but this
list has 90,000+ records and I cannot do it for each zip code individually.
Can anyone help?

Thanks!

Lee

What does the number of records have to do with anything?

=Left([Zip],5)

will display the first 5 characters in the Zip field, regardless of
whether there are 5 or more characters.
 
I have a list of Zip codes, some have the +4 and some do not. I am trying to
show the left 5 numbers (i.e. only the zip code, not the +4) in a column
using the left function. I know how to do it with a specific string, but this
list has 90,000+ records and I cannot do it for each zip code individually.
Can anyone help?

Thanks!

Lee

Umm?? What's the problem?

Left([Zip], 5)

will return 83660 for either "83660" or "83660-6354" in the zip field. You
don't need to do anything different for the two subsets of data!

John W. Vinson [MVP]
 
Back
Top