Wildcard Searches in SQL
This section discusses using wildcard searches in your SQL comparisons in the Platform, including CONTAINS, STARTS WITH, ENDS WITH, and LIKE.
Wildcards use the LIKE keyword with a wildcard (%) because they are not exact matches.
CONTAINS
The CONTAINS Wildcard search uses wildcards at the beginning and end. This example would return "Johnson, Kate" and "Smith, John."
Display_Name LIKE '%John%'
STARTS WITH & ENDS WITH
STARTS WITH uses a wildcard at the end. The name "Johnson, Kate" would be returned, but not "Smith, John"
Display_Name LIKE 'John%'
ENDS WITH uses a wildcard at the beginning:
Display_Name LIKE '%John'
It would return "Smith, John" but not "Smith, Johnny"
LIKE
Use the LIKE comparison to enter your own wildcard combination. It is useful for more complex comparisons, such as:
Email_Address LIKE john%@%.com