Returns the type of aggregate function in a compute column.
SqlAltOp% ( sqlconn%, computeid%, column% )
where
The type of aggregate function in a particular column in a COMPUTE clause, as follows:
| Aggregate function type |
Aggregate operator |
|---|---|
| SQLAOPSUM | SUM |
| SQLAOPAVG | AVG |
| SQLAOPCNT | COUNT |
| SQLAOPMIN | MIN |
| SQLAOPMAX | MAX |
Call SqlAltOp% only after SqlNextRow% or SqlGetRow% returns a computeid. When the computeid% or column% is not valid, -1 is returned.
SqlAltOp% returns the type of aggregate function in a particular column in a COMPUTE clause. In the following example, SqlAltOp%(sqlconn%, 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 SqlPrType$.
SqlAData$, SqlADLen&, SqlAltLen%, SqlGetRow%, SqlNextRow%, SqlNumAlts%, SqlPrType$