SPLIT
functionsupportedCore SQL functionsSplits a given string with a given separator and returns the result in an array of strings. Contiguous split strings in the source string, or the presence of a split string at the beginning or end of the source string, results in an empty string in the output. An empty separator string results in an array containing only the source string. If either parameter is a NULL, a NULL is returned. You can use functions and constructs that operate on arrays on the result, such as FLATTEN, ARRAY_SIZE, and access by index position. See also: SPLIT_PART
Syntax
SPLIT(<string>, <separator>)
Parameters
| Name | Required | Description |
|---|---|---|
string | required | Text to be split into parts. |
separator | required | Text to split string by. |
Returns
The data type of the returned value is ARRAY.
Collation details
This function doesn’t support the following collation specifications: - pi (punctuation-insensitive). - cs-ai (case-sensitive, accent-insensitive). The values in the output array don’t include a collation specification and therefore don’t support further collation operations.