SUBSTRING_BEFORE
Returns the substring of the provided string before the match of the string to match (see Remarks).
Usage
SUBSTRING_BEFORE(source, match)
Parameters
source |
String |
The string to get a substring of. |
match |
String |
The string to match. |
Returns
String
Examples
SUBSTRING_BEFORE(‘Hello everyone’, ‘ever’) |
Hello |
SUBSTRING_BEFORE(‘Hello everyone’, ‘joe’) |
Hello everyone |
Remarks
If there’s no match in the source, the function returns the original string.