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;
nt damex_describeSelectTopClause(
long  hquery,
long    piNumRows,
int       pbPercent)

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
    TitleResults for “How to create a CRG?”Also Available inAlert