Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

damex_describeSelectTopClause

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

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(
    DAM_HQUERY  hquery,
    int64 *     piNumRows,
    int    *    pbPercent)

Parameters for damex_describeSelectTopClause

Parameter Type Description
IN
hquery DAM_HQUERY The query handle.
OUT
piNumRows int64 * 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
    TitleResults for “How to create a CRG?”Also Available inAlert