Export the query to Excel and remove the +4:
- In Excel, highlight the column with the ZIP codes. For example, if the ZIP codes are in column H, click the H to highlight the column.
- Select Data, Text to Columns... from the menu bar. The Convert Text to Columns Wizard appears.
- In Step 1 of 3, ensure Delimited is selected and click Next
- In Step 2 of 3, unmark Tab and select Other. In the text box next to other, enter a dash (-). Note: enter the actual - not the word dash. Click Next.
- In Step 3 of 3, make no changes and click Finish.
- The +4 are placed in a different column. For example, if the ZIP codes were originally in column H, the 5 digit ZIP remains in H. The +4 is placed in the I. Delete the column with the +4.
- Sort the spreadsheet by ZIP and save in CSV format. Use this file to merge in Word.
Use one of the following filters in the query:
- Zip code does not contain -
- Zip code = the specific zip code
- Zip code one of specific zip codes
Example: To search for those with a Zip Code 12345-6789, you can search in Criteria Zip Code equals 12345*.
This will only work with the operator of "equal", it will not work with the operator "one of". So if we need to do multiple zip codes with the +4, we'll want to do multiple Preferred Zip "equals" fields all grouped with an "OR" in the query.
Sort by ZIP code in Crystal Reports.