You are here: Functions > FIND() > Finding Literal Strings Containing Blanks

Finding Literal Strings Containing Blanks

To search for a literal string that contains a blank, you must surround the literal with double quotes and then wrap them with single quotes. the FIND() function interprets the internal double quotes consistent with Google, treating the string between the double quotes as an entire string.

To search for the string “family lawyer” in the JOB_DESCRIPTION field, you would normally enter:

FIND("family lawyer",JOB_DESCRIPTION)

By default the FIND() function would return a true value if both “family” and “lawyer” were found individually in the JOB_DESCRIPTION field regardless of their order.

To ensure that the FIND() function only returns a true value if the exact literal string “family lawyer” is found in the JOB_DESCRIPTION field, you would need to specify the double quoted literal surrounded by single quotes:

FIND('"family lawyer"',JOB_DESCRIPTION)

In this case, the FIND() function only returns a true value if the exact string “family lawyer” is found in the JOB_DESCRIPTION field.

When searching for multiple strings, some of which are literals containing blank spaces, you need to surround those literals containing blanks with internal double quotes while spacing the other search strings with blanks. The entire set must be surrounded by single quotes.

To search for “commercial” and “real estate” in the JOB_DESCRIPTION field:

FIND('commercial "real estate"',JOB_DESCRIPTION)

The FIND() function would return a true value if “commercial” and the literal string “real estate” were BOTH found in the JOB_DESCRIPTION field within the same record.