NVP_UDF

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Definition

Equivalent to the NVP Teradata's function.

NVP_UDF(INSTRING VARCHAR, NAME_TO_SEARCH VARCHAR, NAME_DELIMITERS VARCHAR, VALUE_DELIMITERS VARCHAR, OCCURRENCE FLOAT)

Parameters

INSTRING VARCHAR

The name-value pairs.

NAME_TO_SEARCH VARCHAR

The name to search in the NVP function.

NAME_DELIMITERS VARCHAR

The delimiter to separate the name-value pairs.

VALUE_DELIMITERS VARCHAR

The delimiter to associate a name to its value.

OCCURRENCE FLOAT

The number of coincidences to look up for.

Returns

A varchar value with the same instring data.

Usage example

Input:

SELECT PUBLIC.NVP_UDF('entree=-orange chicken&entree+.honey salmon', 'entree', '&', '=- +.', 1);

Output:

orange chicken

Last updated