Returns the operand column ID for a compute column.
INT dbaltcolid (
PDBPROCESS dbproc,
INT computeid,
INT column );
where
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, dbadlen, dbaltlen, dbgetrow, dbnextrow, dbnumalts, dbprtype