How to query on Postal Codes that only have 5 digits

Postal codes can be either 5 digits (like: 12345) or 5 + 4 digits (like: 12345-6789) and sometimes we would like to find those with only 5 digits to update them. 

To find all accounts with a Postal Length of only 5 digits we will hava to do a compound query.

1st Query (to include everyone that has a postal code):
1) Query Category: Base / Query: All Accounts - A
2) Data Return Type: Accounts
3) Criteria Options: Match each critieria
4) Select Any Persona
5) Criteria: Postal Code: Mark box - Field has any Value

2nd Query (to include everyone that has more than 5 digits in Postal Code):
1) Query Category: Base / Query: All Accounts - A
2) Data Return Type: Accounts
3) Criteria Options: Match each critieria
4) Select Any Persona
5) Criteria: Postal Code Length: Greater Than or Equal to 6

3rd Query - Compound Query (to only show those that have 5 or less digits in their Postal Code):
1) Data Return Type: Accounts
2) Select Compound Type: Subtract Query 2 from Query 1
3) Query 1: Select the 1st query you created (All Postal Codes)
4) Query 2) Select the 2nd query you created (Postal Codes 6+ digits)
5) Save and Preview

Environment

 eTapestry

Was this article helpful?


Thanks for your feedback! Did this solve your issue?

Comments (optional):


Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):


Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.