SQL-limits - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Product
Call-Level Interface Version 2
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

The SQL‑limits might be used either to construct SQL statements to optimize its execution for the accessed Teradata Database or to prevent errors caused by exceeding limits.

Refers to the Teradata Database associated with the TDP whose TDP identifier is addressed by the QEPTIDP field and has length specified by the QEPTLEN field. Since they do not apply, the QEPRQST and QEPTOKEN fields must contain binary zeroes.

Returns limits for the Teradata Database affecting an application's use of SQL statements. The response consists of twenty-four field totalling one-hundred four bytes.

 

Item Code

Mnemonic

ResponseDBQERSQL (DbqerSQL for C)

Fields

Value

36

QEPISQL

QERSQLRL ('rowLen' for C, ROWLEN for COBOL, ROW_LEN for PL/I)

An eight-byte unsigned integer is the number of usable bytes in a Database table row.

In C compilers not supporting 64bit integers, an array named 'rowLenHalf' consisting of two four-byte unsigned integers, each containing four bytes of the value, is used.

 

 

QERSQLLL ('lobLen' for C, LOBLEN for COBOL, LOB_LEN for PL/I)

An eight-byte unsigned integer is the maximum number of bytes for a large object, either a binary or character object.

In C compilers not supporting 64bit integers, an array named 'lobLenHalf' consisting of two four-byte unsigned integers, each containing four bytes of the value, is used.

 

 

QERSQLNL ('nameCharlen' for C, NAMECHARLEN for COBOL, NAME_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of single-byte characters in a Teradata name (such as a userid, table name, column name). The presence of multi-byte characters will correspondingly lower the effective maximum.

 

 

QERSQLKT ('tableColumns' for C, TABLECOLUMNS for COBOL, TABLE_COLUMNS for PL/I)

A four-byte unsigned integer is the maximum number of columns in a table.

 

 

QERSQLTS ('selectTables' for C, SELECTTABLES for COBOL, SELECT_TABLES for PL/I)

A four-byte unsigned integer is the maximum number of tables that may be specified in a SELECT statement.

 

 

QERSQLKS ('expressionColumns' for C, EXPRESSIONCOLUMNS for COBOL, EXPRESSION_COLUMNS for PL/I)

A four-byte unsigned integer is the maximum number of columns that may be specified in a SELECT statement expression.

 

 

QERSQLKG ('groupbyColumns' for C, GROUPBYCOLUMNS for COBOL, GROUPBY_COLUMNS for PL/I)

A four-byte unsigned integer is the maximum number of columns that may be specified in a GROUPBY SQL clause.

 

 

QERSQLKO ('orderbyColumns' for C,
ORDERBY
COLUMNS
for COBOL, ORDERBY_COLUMNS for PL/I)

A four-byte unsigned integer is the maximum number of columns that may be specified in a ORDERBY SQL clause.

 

 

QERSQLLC ('charLitCharlen' for C, CHARLITCHARLEN for COBOL, CHAR_LIT_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of singlebyte characters for a CHARACTER literal (a string of characters enclosed by apostrophes). The presence of multi-byte characters will correspondingly lower the effective maximum.

 

 

QERSQLLH ('hexLitCharlen' for C, HEXLITCHARLEN for COBOL, HEX_LIT_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of single-byte characters for a HEXADECIMAL literal (a string of hexadecimal characters enclosed by apostrophes and followed by at least the letter X). The presence of multi-byte characters will correspondingly lower the effective maximum.

 

 

QERSQLKL ('columnLen' for C, COLUMNLEN
for COBOL, COLUMN_LEN for PL/I)

A four-byte unsigned integer is the maximum number of bytes for a column.

 

 

QERSQLC ('charCharlen' for C, CHARCHARLEN for COBOL, CHAR_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of single-byte characters in a column of data type CHARACTER. The presence of multi-byte characters will correspondingly lower the effective maximum.

 

 

QERSQLVC ('varcharCharlen' for C, VARCHARCHARLEN for COBOL, VARCHAR_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of single-byte characters in a column of data type VARCHAR. The presence of multi-byte characters will correspondingly lower the effective maximum.

 

 

QERSQLG ('graphicCharlen' for C, GRAPHICCHARLEN for COBOL, GRAPHIC_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of two-byte characters in a column of data type GRAPHIC.

 

 

QERSQLVG ('vargraphicCharlen' for C, VARGRAPHICCHARLEN for COBOL, VARGRAPHIC_CHARLEN for PL/I)

A four-byte unsigned integer is the maximum number of two-byte characters in a column of data type VARGRAPHIC.

 

 

QERSQLB ('byteLen' for C, BYTELEN for COBOL, BYTE_LEN for PL/I)

A four-byte unsigned integer is the maximum number of bytes in a column of data type BYTE.

 

 

QERSQLVB ('varbyteLen' for C, VARBYTELEN for COBOL, VARBYTE_LEN for PL/I)

A four-byte unsigned integer is the maximum number of bytes in a column of data type VARBYTE.

 

 

QERSQLPD ('decimalPrecision' for C, DECIMALPRECISION for COBOL, DECIMAL_PRECISION for PL/I)

A four-byte unsigned integer is the maximum precision (number of digits) in a column of data type DECIMAL or NUMERIC.

 

 

QERSQLET ('timeScale' for C, TIMESCALE for COBOL, TIME_SCALE for PL/I)

A four-byte unsigned integer is the maximum scale (number of digits to the right of the decimal point; sometimes referred to as the fractionalized precision) in a column of data type TIME [WITH TIME ZONE].

 

 

QERSQLEP ('timestampScale' for C, TIMESTAMPSCALE for COBOL, TIMESTAMP_SCALE for PL/I)

A four-byte unsigned integer is the maximum scale (number of digits to the right of the decimal point; sometimes referred to as the fractionalized precision) in a column of data type TIMESTAMP [WITH TIME ZONE].

 

 

QERSQLES ('intervalSecondScale' for C, INTERVALSECONDSCALE for COBOL, INTERVAL_SECOND_SCALE for PL/I)

A four-byte unsigned integer is the maximum scale (number of digits to the right of the decimal point; sometimes referred to as the fractionalized precision) in a column of data type INTERVAL DAY TO SECOND, INTERVAL HOUR TO SECOND, INTERVAL MINUTE TO SECOND, or INTERVAL SECOND.

 

 

QERSQLUN ('usingValues' for C, USINGVALUES for COBOL, USING_VALUES for PL/I)

A four-byte unsigned integer is the maximum number Teradata SQL USING row descriptor fields.

 

 

QERSQLPQ ('requestParms' for C, REQUESTPARMS for COBOL, REQUEST_PARMS for PL/I)

A four-byte unsigned integer is the maximum number of variable names in a Teradata/SQL parameterized query request.

 

 

QERSQLPP ('procedureParms' for C, PROCEDUREPARMS for COBOL, PROCEDURE_PARMS for PL/I)

A four-byte unsigned integer is the maximum number of parameters to a stored procedure.

 

 

QERSQLEN ('elicitNameLen' for C, ELICIT-NAME-LEN for COBOL, ELICIT_NAME_LEN for PL/I)

A four-byte unsigned integer is the maximum number of bytes that may be specified by the Using-data field for AS DEFERRED BY NAME phrase. If the length is not available, a value of zero is returned (and 1024 can be assumed).

 

 

QERSQLR1
('FILLER' for COBOL, fill1[4]' for C, FILL1' for PL/I)

A four-byte reserved value.

 

 

QERSQLJS ('JSON-LEN' for COBOL, JSONLen' for C, JSON_LEN' for PL/I)

An eight-byte unsigned integer is the maximum length of a JavaScript Object Notation object).

In C compilers not supporting 64-bit integers, an array named JSONLenHalf' consisting of two four-byte unsigned integers, each containing four bytes of the value, is used.

 

 

QERSQLPL ('responseRowLen' for C, RESPONSE-ROW-LEN for COBOL, RESPONSE_ROW_LEN for PL/I)

An eight byte unsigned integer is the maximum number of bytes that may be returned in a row. If the length is not available, a value of zero is returned.

In C compilers not supporting 64-bit integers, an array named 'responseRowLenHalf' consisting of two four-byte unsigned integers, each containing four bytes of the value, is used.