Syntax - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™
void
FNC_SetArrayElementsWithMultiValues (ARRAY_HANDLE     aryHandle,
                                     bounds_t        *arrayInterval,
                                     void            *newValues,
                                     long             newValuesBufSize,
                                     NullBitVecType  *nullBitVec,
                                     long             nullBitVecBufSize)

Syntax Elements

aryHandle
the handle to an ARRAY type that is defined to be a return value to a UDF or UDM, or an INOUT or OUT parameter to an external stored procedure.
arrayInterval
an array of bounds_t structures that provides the index to the set of ARRAY elements that will be modified to newValues.
For a 1-D ARRAY, the index to the set of elements is provided in the first cell of the arrayInterval array. If the ARRAY type is n-D, then subsequent dimension information is placed in cells 2-5 as needed.
The bounds_t structure is defined in sqltypes_td.h as:
typedef struct bounds_t {
   int lowerBound;
   int upperBound;
} bounds_t;
The value of lowerBound specifies the first value in the given dimension to be modified, and upperBound specifies the last value in the given dimension to be modified.
This range of elements must be sequential for a 1-D ARRAY, and must be specified as a slice or rectangle of elements for an n-D ARRAY. The boundaries (lower and upper) for each dimension must be within the limits defined for the ARRAY type.
newValues
a pointer to a buffer that FNC_SetArrayElementsWithMultiValues uses to set the values of the affected elements.
newValuesBufSize
the total size in bytes of the newValues buffer.
nullBitVec
a pointer to a NullBitVector array previously allocated by the caller. For the range of elements requested, the relevant bits of nullBitVec will be set to:
  • 1 if the element is present and non-null.
  • 0 if the element is present but is set to NULL.
nullBitVecBufSize
the size of the NullBitVector as allocated by the caller prior to initialization of the NullBitVector by setting all bytes to 0.
This parameter is required for protected mode execution of FNC_SetArrayElementsWithMultiValues.