16.20 - tdr.GetLobLength - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Purpose

Retrieves the length of an input LOB.

Syntax

tdr.GetLobLength(locator)
locator
Parameter type: integer

See how this function retrieves the length of an input LOB.

Return Value

A real value representing the number of bytes in the LOB.

Usage Notes

This function is valid only if called from the table operator.

An error is raised if the function is called from the contract function.

Example: Get the Length of an Input LOB

# Open the input stream
inHandle <- tdr.Open("R", 0, 0);

# Get the 5th attribute in the current row (LOB locator)
att5 <- tdr.GetAttributeByNdx(inHandle, 4, NULL);

# Get the length of the input LOB
length <- tdr.GetLobLength(att5);