On this page

    Categories: String

    SPLIT_PART

    Splits a given string at a specified character and returns the requested part.

    Syntax

    SPLIT_PART(expression varchar, delimiter varchar, part_number int32) → varchar

    • expression: Input expression.
    • delimiter: String representing the delimiter to split the input expression by.
    • part_number: Requested part of the split. Must be an integer greater than zero.

    Examples

    SPLIT_PART example
    SELECT SPLIT_PART('127.0.0.1', '.', 1)
    -- 127