Return String Types in Distributed Transactions
In cross-database distributed queries that access tables in different databases of the same HCL OneDB™HCL OneDB instance, the same types are returned by CONCAT (and by other built-in string manipulation functions that follow the same rules for return type promotion) that the section Return Types from the CONCAT Function describes.
The same types are also returned in cross-server distributed queries, if every participating HCL OneDB instance that evaluates these string-manipulation function expressions is no earlier than Version 11.50.xC2.
For cross-server distributed operations in which the return value is evaluated on a remote HCL OneDB instance earlier than Version 11.50.xC2, the following table (in the same format as the table for Version 11.50.xC2 and later) lists the possible return data types (or -881 overflow error) for the specified data types of arguments to the string-manipulation function (or for operands of the concatenation ( || ) operator:
NCHAR | NVARCHAR | CHAR | VARCHAR | LVARCHAR | Other | |
---|---|---|---|---|---|---|
NCHAR | nchar | nvarchar or EM -881 | nchar | nchar | nchar | nchar |
NVARCHAR | nchar or EM -881 | nvarchar or EM -881 | nvarchar or EM -881 | nvarchar or EM -881 | nvarchar or EM -881 | nvarchar or EM -881 |
CHAR | nchar | nvarchar or EM -881 | char | varchar or EM -881 | char | char |
VARCHAR | nchar | nvarchar or EM -881 | varchar or EM -881 | varchar or EM -881 | varchar or EM -881 | varchar or EM -881 |
LVARCHAR | nchar | nvarchar or EM -881 | char | varchar or EM -881 | char | char |
Other | nchar | nvarchar or EM -881 | char | varchar or EM -881 | char | char |
- Earlier releases accept LVARCHAR arguments, but cannot return LVARCHAR values.
- If the result is longer than the maximum size of the argument of the longest data type, earlier releases do not support data-type promotion, but issue error -881. (This is typically with VARCHAR or NVARCHAR arguments, if the length of the resulting string would be greater than 255 bytes.)
For all versions of HCL OneDB, error -881 is issued if the length of a returned string exceeds 32Kb.