Returns the type of aggregate function for a compute column.
INT dbaltop (
INT column );
The DBPROCESS structure that is the handle for a particular workstation or Microsoft® SQL Server™ 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
The ID that identifies the COMPUTE clause. A SELECT statement can have multiple COMPUTE clauses, which can have varying numbers of aggregate operators and aggregate targets. The computeid is returned by dbnextrow or dbgetrow.
The number of the column. The first column is number 1.
The type of aggregate operator for the particular column in the compute. The types are defined as follows:
Call dbaltop only after dbnextrow or dbgetrow returns a computeid.
If computeid or column is not valid, -1 is returned.
After the following SELECT statement, calling dbaltop(dbproc, 1, 1) returns the type for COUNT because the first aggregate operator in the first COMPUTE clause is COUNT:
SELECT dept, name FROM employee ORDER BY dept, name COMPUTE COUNT(name) BY dept
To convert the type to a readable string, use dbprtype.