Return the type of aggregate operator for a particular compute column.
int dbaltop(dbproc, computeid, column) DBPROCESS *dbproc; int computeid; int column;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The ID that identifies the particular compute row of interest. A SQL select statement may have multiple compute clauses, each of which returns a separate compute row. The computeid corresponding to the first compute clause in a select is 1. The computeid is returned by dbnextrow or dbgetrow.
The number of the column of interest. The first column is number 1.
A token value for the type of the compute column’s aggregate operator. In case of error, dbaltop returns -1.
This routine returns the type of aggregate operator for a particular column in a compute row. For example, given the SQL statement:
select dept, name from employee
order by dept, name
compute count(name) by dept
the call dbaltop(dbproc, 1, 1) will return the token value for count since the first aggregate operator in the first compute clause is count.
You can convert the token value to a readable token string with dbprtype. See the dbprtype reference page for a list of all token values and their equivalent token strings.