Returns the number of columns in a compute row.
INT dbnumalts (
INT computeid );
Is 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.
Is 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 columns for the particular computeid. If computeid is invalid, - 1 is returned.
Call this function after dbresults has returned SUCCEED.
In this example, dbnumalts(dbproc, 1) returns 3:
SELECT dept, year, sales FROM employee ORDER BY dept, year COMPUTE AVG(sales), MIN(sales), MAX(sales) BY dept