SUBSTR_UDF (STRING, FLOAT)
This is the user-defined function (UDF) overloaded with two parameters.
Definition
Extracts a substring from a named string based on position.
PUBLIC.SUBSTR_UDF(BASE_EXPRESSION STRING, START_POSITION FLOAT)
Parameters
BASE_EXPRESSION
STRING
The expression from which the substring is to be extracted.
START_POSITION
FLOAT
The starting position of the substring to extract from.
Returns
The required substring.
Migration example
Input:
SELECT SUBSTRING('Hello World!' FROM -2);
Output:
SELECT
PUBLIC.SUBSTR_UDF('Hello World!', -2);
Last updated