dbnumcompute

Description

Return the number of compute clauses in the current set of results.

Syntax

int dbnumcompute(dbproc)
 
DBPROCESS   *dbproc;

Parameters

dbproc

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.

Returns

The number of compute clauses in the current set of results.

Usage

This routine returns the number of compute clauses in the current set of results. The application can call it after dbresults returns SUCCEED. For example, in the SQL statement, the call dbnumcompute(dbproc) will return 2 since there are two compute clauses in the select statement:

select dept, name from employee 
order by dept, name 
compute count(name) by dept 
compute count(name) 

See also

dbnumalts, dbresults