SqlNumCompute%

Returns the number of COMPUTE clauses in the current set of results.

Syntax

SqlNumCompute% ( sqlconn% )

where

sqlconn%
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

The number of COMPUTE clauses in the current results set.

Remarks

Call SqlNumCompute% after SqlResults% returns SUCCEED.

Example

In this example, SqlNumCompute%(sqlconn%) returns 2 because 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

SqlNumAlts%, SqlResults%