Example: Query Band UPDATE Examples - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example set demonstrates how to specify and use the query band UPDATE option.

This example uses the UPDATE option to add the name:value pairs city:san diego and state:california.

     SET QUERY_BAND = 'city=san diego;' UPDATE FOR SESSION;
     GETQUERYBAND()
     -----------------------------------------------------------------
     =S> city=san diego;
     SET QUERY_BAND = 'state=california;' UPDATE FOR SESSION;
     GETQUERYBAND()
     -----------------------------------------------------------------
     =S> state=california;city=san diego;

This example uses UPDATE to change the value of the name:value pair city:san diego to city:fresno.

     SET QUERY_BAND = 'city=Fresno;' UPDATE FOR SESSION;
     GETQUERYBAND()
     -----------------------------------------------------------------
     =S> 'city=Fresno;state=california;

This example replaces the entire query band by not specifying the UPDATE option.

     SET QUERY_BAND = 'ID=k31293; Job=payroll;' FOR SESSION;
     GETQUERYBAND()
     -----------------------------------------------------------------
     =S> ID=k31293;Job=payroll;