Returns the maximum length of the data for a compute column.
DBINT dbaltlen (
PDBPROCESS dbproc,
INT computeid,
INT column );
The maximum number of bytes that the data can be for a particular column in a compute. When no such column or compute exists, -1 is returned.
dbaltlen returns the maximum length, in bytes, for a particular column in a compute row. For variable-length data, this is not necessarily the actual length of the data, but rather the maximum length. Calling dbaltlen only after dbnextrow or dbgetrow returns a computeid. For the actual data length, use dbadlen.
After the following SELECT statement, calling dbaltlen(dbproc, 1, 1) returns 4, because counts are of SQLINT4 type, which is 4 bytes long:
SELECT dept, name FROM employee
ORDER BY dept, name
COMPUTE COUNT(name) BY dept
dbadata | dbgetrow |
dbadlen | dbnextrow |
dbalttype | dbnumalts |