SUBSTRING
Translation specification for the SUBSTRING/SUBSTR functions to their Snowflake equivalents
Description
Extracts a substring from a given input string. For more information check SUBSTRING/SUBSTR.
SUBSTRING(string_expr FROM n1 [FOR n2])
SUBSTR(string_expr, n1, [, n2])
When the value to start getting the substring (n1) is less than one SUBSTR_UDF is inserted instead.
Sample Source Patterns
SUBSTRING transformation
Teradata
SELECT SUBSTR('Hello World!', 2, 6),
SUBSTR('Hello World!', -2, 6),
SUBSTRING('Hello World!' FROM 2 FOR 6),
SUBSTRING('Hello World!' FROM -2 FOR 6);
Snowflake
SELECT
SUBSTR('Hello World!', 2, 6),
PUBLIC.SUBSTR_UDF('Hello World!', -2, 6),
SUBSTRING('Hello World!', 2, 6),
PUBLIC.SUBSTR_UDF('Hello World!', -2, 6);
Related EWIs
No related EWIs.
Last updated