skip to main content
SQL Engine parse tree methods for .NET : SQL pass-through and advanced query methods reference : damex_describeSelectTopClause
 

damex_describeSelectTopClause

This function returns details of the TOP N clauses for a SELECT query. The TOP clause indicates the maximum number of rows to be returned.
Example queries:
SELECT TOP 10 * FROM emp;
 
SELECT TOP 5 PERCENT * FROM emp;
int damex_describeSelectTopClause(
long hquery,
long piNumRows,
int pbPercent)
 
Table 220: Parameters for damex_describeSelectTopClause  
Parameter
Type
Description
IN
 
 
hquery
long
The query handle.
OUT
 
 
piNumRows
long
The number of rows in the TOP clause. This number should be treated as a PERCENT if value of pbPercent is returned as TRUE.
pbPercent
int
Indicates if TOP N number was specified with PERCENT option. Valid value are:
TRUE
FALSE
RETURN
 
 
 
int
DAM_SUCCESS – on success
DAM_FAILURE – on failure