StatementStatus
Purpose
For a session that permits its use, StatementStatus may be returned upon completion of a Teradata SQL statement instead of Success, OK, Error, Failure, ErrorInformation, and StatementError parcels. Even when permitted, StatementStatus may or may not be used.
Usage Notes
This parcel is generated by the Teradata Database.
Parcel Data
The following information applies to the StatementStatus parcel.
Flavor |
Mnemonic |
TRDSPBTU |
||
Field |
Length |
Value |
||
205 |
TRDSPFTU |
PBTUST |
1 byte unsigned integer |
The status of the statement, as one of the following: |
|
|
PBTURM |
1 byte unsigned integer |
When the status is Success or OK, the Response Mode, if applicable, specified for the request, as one of the following: |
|
|
|
2 byte unsigned integer |
Bytes that are currently unused. |
|
|
PBTUSNUM |
4 byte unsigned integer |
The number of the Teradata SQL statement in the request. |
|
|
PBTUCODE |
2 byte unsigned integer |
When the status is Error, Failure, or Statement‑Error, the Database error code, described in the Teradata Messages manual, where the error code is the message number. |
|
|
PBTUATYP |
2 byte unsigned integer |
When the status is Success or OK, the encoded representation of the Teradata SQL statement. See Table 65 on page 440 for more information. |
|
|
PBTUACNT |
8 byte unsigned integer |
When the status is Success or OK, the total number of records selected, inserted, updated, or deleted by the statement. |
|
|
PBTUFCNT |
8 byte unsigned integer |
When the status is Success or OK, the total number of fields returned in each record. |
|
|
|
4 byte unsigned integer |
Bytes that are currently unused. |
The rest of the parcel, if any, consists of one or more self-defining expressions that supply any context-dependent information. Each extension begins with the following header:
TRDSAUXI |
||
Field |
Length |
Description |
PBTUXIID |
2 byte unsigned integer |
Information identifier, as one of the following: |
PBTUXILN |
4 byte unsigned integer |
Number of bytes of data, not including this header. |
Following the standard header is data that depends upon the information id.
The Warning Message Extension
The Warning Message extension consists of the following information:
TRDSAUWM |
||
Field |
Length |
Description |
PBTUWMIH |
6 bytes |
The extension header described in above as the TRDSAUXI area. |
PBTUWMCD |
2 byte unsigned integer |
The Database warning code, described in the Messages manual, where the warning code is the message number. |
PBTUWMCO |
2 byte unsigned integer |
The Database origin of the warning code. Currently unused. If it is used in the future, it will be described in the Teradata Messages manual. |
PBTUWMTL |
4 byte unsigned integer |
The length, in bytes, of the message. |
PBTUWMTX |
Characters in the character set when the request was initiated, for the number of bytes defined by the PBTUWMTX field. For character sets allowing multiple bytes per character, the number of characters may be less than the number of bytes. |
The text of the message. |
The Merge Activity Counts Extension
The Merge Activity Counts extension consists of the following information:
TRDSAUMC |
||
Field |
Length |
Description |
PBTUMCIH |
6 bytes |
The extension header described above as the TRDSAUXI area. |
PBTUMCI |
8 byte unsigned integer |
The total number of records inserted by the statement. |
PBTUMCU |
8 byte unsigned integer |
The total number of records updated by the statement. |
|
8 byte unsigned integer |
Bytes that are currently unused. |
The TDP‑Generated Response Extension
The TDP‑Generated Response extension consists of the following information:
TRDSAUTG |
||
Field |
Length |
Description |
PBTUTGIH |
6 bytes |
The extension header described above as the TRDSAUXI area. |
PBTUTGR |
1 byte unsigned integer |
One of the following: |
PBTUGE |
8 bits |
Any exceptions that occurred when building the response, each indicated by a specific bit, more than one of which can be present, as follows: |