STARTS_WITH

Description

Returns TRUE if the provided string starts with any of the specified compare_strings (case-sensitive); otherwise, returns FALSE.

Syntax

STARTS_WITH(string, ...compare_strings) -> Boolean

Parameters

ParameterData TypeRequiredDescription
stringStringYesThe string to evaluate.
...compare_stringsStringYesOne or more strings to check for at the beginning of the source string.

Examples

STARTS_WITH(Email, "sales@")
-- Returns TRUE if Email starts with "sales@"; otherwise, returns FALSE.
STARTS_WITH("Invoice-2023-001", "INV", "Invoice")
-- Returns TRUE because the string starts with "Invoice" (case-sensitive).

Tips

  • An empty compare_strings always returns TRUE since every string starts with an empty string.

  • Punctuation and symbols are treated like letters.