SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
Embedded-Only SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
3-57
GET DIAGNOSTICS Statement
statement-info
assigns statement information, statement-info, to host variables. See 
Statement Items of GET DIAGNOSTICS on page 3-58.
variable-name = statement-item-name
retrieves the named statement information item statement-item-name and 
stores the data into the named host variable variable-name. The data type 
of the target host variable must be compatible with the data type of the 
statement information item.
condition-info
assigns condition information, condition-info, to host variables. See 
Condition Items of GET DIAGNOSTICS on page 3-58.
EXCEPTION condition-nbr
specifies the number, condition-nbr, of the condition about which to return 
diagnostic information. The data type of the number is exact numeric with 
scale 0.
variable-name = condition-item-name
retrieves the named condition information item condition-item-name and 
stores the data into the named host variable variable-name. The data type 
of the target host variable must be compatible with the data type of the 
condition information item.
condition-item-name is:
 CONDITION_NUMBER 
 | RETURNED_SQLSTATE 
 | CLASS_ORIGIN 
 | SUBCLASS_ORIGIN 
 | SERVER_NAME 
 | CONNECTION_NAME 
 | CONSTRAINT_CATALOG 
 | CONSTRAINT_SCHEMA 
 | CONSTRAINT_NAME 
 | CATALOG_NAME 
 | SCHEMA_NAME 
 | TABLE_NAME 
 | COLUMN_NAME 
 | CURSOR_NAME 
 | MESSAGE_TEXT 
 | MESSAGE_LENGTH 
 | MESSAGE_OCTET_LENGTH 
 | NSK_CODE 
 | SQLCODE 










