Format field for Zip + 4
Posted on 2015-01-13
In a table we have existing data for zip codes, (one field), that in some cases is just the zip like for example "12345". In other records we have the zip+4 as "23456-2345". But in other cases we may have the zip as "456781234". We're working with only data files, hence the inconsistency.
But regardless, in a query designer I need to format the zip code, whatever it is to look like:
"12345" if that is all we have.
But if we have "23456-2345" OR "234562345" it needs to look like "23456-2345"
Hopefully this makes sense. How can I format the field in the query designer?