DB2 Scalar functions - Miscellaneous scalar functions - www.cadcobol.com.br


Volta ao Menu das scalar functions Volta ao Menu Principal

Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

DB2 Scalar functions - Miscellaneous scalar functions
Function Description
BITAND, BITANDNOT, BITOR, BITXOR, and BITNOT These bitwise functions operate on the "two's complement" representation of the integer value of the input arguments and return the result as a corresponding base 10 integer value in a data type based on the data type of the input arguments.
COALESCE Returns the first argument that is not null.
CURSOR_ROWCOUNT Returns the cumulative count of all rows fetched by the specified cursor since the cursor was opened.
DECODE Compares each specified expression2 to expression1.
If expression1 is equal to expression2, or both expression1 and expression2 are null, the value of the following result-expresssion is returned.
If no expression2 matches expression1, the value of else-expression is returned; otherwise a null value is returned.
DEREF Returns an instance of the target type of the reference type argument.
EVENT_MON_STATE Returns the operational state of particular event monitor.
GREATEST Returns the maximum value in a set of values.
HEX Returns a hexadecimal representation of a value.
IDENTITY_VAL_LOCAL Returns the most recently assigned value for an identity column.
INTNAND, INTNOR, INTNXOR, and INTNNOT These bitwise functions operate on the "two's complement" representation of the integer value of the input arguments and return the result as a corresponding base 10 integer value.
LEAST Returns the minimum value in a set of values.
LENGTH Returns the length of a value.
MAX Returns the maximum value in a set of values.
MIN Returns the minimum value in a set of values.
NULLIF Returns a null value if the arguments are equal; otherwise, it returns the value of the first argument.
NVL Returns the first argument that is not null.
RAISE_ERROR Raises an error in the SQLCA. The sqlstate that is to be returned is indicated by argument1.
The second argument contains any text that is to be returned.
RAWTOHEX Returns a hexadecimal representation of a value as a character string.
REC2XML Returns a string formatted with XML tags, containing column names and column data.
RID and RID_BIT The RID_BIT scalar function returns the row identifier (RID) of a row in a character string format.
The RID scalar function returns the RID of a row in large integer format.
The RID function is not supported in partitioned database environments.
The RID_BIT function is preferred over the RID function.
TABLE_NAME Returns an unqualified name of a table or view based on the object name specified in argument1, and the optional schema name specified in argument2. The returned value is used to resolve aliases.
TABLE_SCHEMA Returns the schema name portion of a two-part table or view name (given by the object name in argument1 and the optional schema name in argument2).
The returned value is used to resolve aliases.
TO_HEX Converts a numeric expression into the hexadecimal representation.
TYPE_ID Returns the internal data type identifier of the dynamic data type of the argument.
The result of this function is not portable across databases.
TYPE_NAME Returns the unqualified name of the dynamic data type of the argument.
TYPE_SCHEMA Returns the schema name of the dynamic data type of the argument.
VALUE Returns the first argument that is not null.


© Copyright IBM Corp.