Returns the operand column ID for a compute column.
INT dbaltcolid (
PDBPROCESS dbproc,
INT computeid,
INT column );
The column ID that the aggregate in the compute applies to. The first column is number 1. If either computeid or column is invalid, -1 is returned. Call this function after dbnextrow or dbgetrow returns a computeid.
When issued after the following SELECT statement, dbaltcolid(dbproc, 1, 1) returns 2, because the COMPUTE COUNT clause in the SELECT statement refers to the second column in the select list:
SELECT dept, name FROM employee
ORDER BY dept, name
COMPUTE COUNT(name) BY dept
dbadata | dbnextrow |
dbadlen | dbnumalts |
dbaltlen | dbprtype |
dbgetrow |