NVP_UDF

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

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) /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'NVP_UDF' INSERTED. ***/;

Output:

orange chicken

Last updated