NVP Function Examples | VantageCloud Lake - NVP Function Examples - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Example: Querying for Entree

The following query:

SELECT NVP ('entree:orange chicken#entree2:honey salmon', 'entree','#', ':', 1);

returns:

'orange chicken'

Example: Querying for Second Occurrence of 'store'

The following query:

SELECT NVP('store = whole foods&&store: ?Bristol farms','store', '&&', '\ =\  :\ ?', 2);

returns:

'Bristol farms'

In this example, occurrence = 2 instructs NVP to search for the second occurrence of 'store'.

Example: Querying for Entree (Default Value)

The following query:

SELECT NVP('entree=orange chicken&entree2=honey salmon', 'entree', 1)

returns:

'orange chicken'

In this example, name_delimiters is & (default value) and value_delimiters is = (default value).

Example: Querying for Entree with One Occurrence

The following query:

SELECT NVP('entree=orange chicken&entree2=honey salmon', 'entree');

returns 'orange chicken'.

In this example, name_delimiters is & (default value), value_delimiters is = (default value), and occurrence is 1 (default value).