SUBSTRING_AFTER
Description
Returns the substring that occurs after the first occurrence of the specified separator within the provided string. If the separator is not found, returns an empty string. The search is case-sensitive.
Syntax
SUBSTRING_AFTER(string, separator) -> String
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| string | String | Yes | The original string. |
| separator | String | Yes | The separator to search for within the string. |
Example
SUBSTRING_AFTER("REF-2025-1234", "-")
-- Returns "2025-1234".
--Extracts the substring after the first occurrence of "-".Tips
The function returns an empty string if any of these occur:
the separator is not found in string,
the separator appears at the end of string.
If the separator is an empty string, the entire string is returned.