17.10 - Example Using FNC_GetQueryBand - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)
#define SQL_TEXT Latin_Text
#include<sqltypes_td.h>
#include<string.h>

void xsp_getqryband ( SQL_TEXT *QBandBuf, char sqlstate[6] )
{
   int QBandLen;

    FNC_GetQueryBand(QBandBuf, FNC_MAXQUERYBANDSIZE, &QBandLen); 

   strcpy(sqlstate, "00000");   // returns exception type

   return ;
}