compare can generate up to six bytes of collation information for each input character. Therefore, the result from using compare may exceed the length limit of the varbinary datatype. If this happens, the result is truncated to fit.
The SAP ASE server issues a warning message, but the query or transaction that contained the compare function continues to run. Since this limit is dependent on the logical page size of your server, truncation removes result bytes for each input character until the result string is less than the following for DOL and APL tables:
Page Size | Maximum Row Length | Maximum Column Length |
---|---|---|
2K (2048 bytes) |
1962 |
1960 bytes |
4K (4096 bytes) |
4010 |
4008 bytes |
8K (8192 bytes) |
8106 |
8104 bytes |
16K (16384 bytes) |
16298 |
16296 bytes |
Page Size |
Maximum Row Length |
Maximum Column Length |
---|---|---|
2K (2048 bytes) |
1964 |
1958 bytes |
4K (4096 bytes) |
4012 |
4006 bytes |
8K (8192 bytes) |
8108 |
8102 bytes |
16K (16384 bytes) |
16300 |
16294 bytes if table does not include any variable length columns |
16K (16384 bytes) |
16300 (subject to a max start offset of varlen = 8191) |
8191-6-2 = 8183 bytes if table includes at least on variable length column.This size includes six bytes for the row overhead and two bytes for the row length field |