skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_getTableSearchExp
 

dam_getTableSearchExp

This function returns the search condition (filter condition) and join conditions for the given table. This function is called from OAIP_execute by the IP to get the filter conditions and join conditions for each table in the join query.
int dam_getTableSearchExp(
DAM_HSTMT hstmt,
int iTableProcessOrder,
DAM_HLOGEXP * phSearchExp,
int * piJoinType,
DAM_HLOGEXP * phJoinExp,
int * pbPartial)
Table 155. Parameters for dam_getTableSearchExp
Parameter
Type
Description
IN
hstmt
DAM_HSTMT
The statement handle.
iTableProcessOrder
int
The table number for the table for which you want to get the conditions.Numbers start at 0.
OUT
phSearchExp
DAM_HLOGEXP *
The handle to the search expression that contains all the filter conditions applicable for the table. Use damex_describeLogicExp to get details of the logical search expression.
piJoinType
int *
Type of the Join:
SQL_JOIN_LEFT_OUTER - left outer join
SQL_JOIN_RIGHT_OUTER - right outer join
SQL_JOIN_FULL_OUTER - full outer join
SQL_JOIN_INNER - inner join
SQL_JOIN_OLD_STYLE - join condition specified in the WHERE clause. Implies an inner join.
phJoinExp
DAM_HLOGEXP *
The handle to the search expression that contains all the join conditions for the table.
Use damex_describeLogicExp to get details of the logical search expression.
pbPartial
int *
TRUE - Indicates that the complete expressions in the WHERE clause and JOIN condition are returned.
FALSE - Indicates that expressions containing correlated sub-queries were not included in the returned search expression.
RETURN
int
DAM_SUCCESS - found a table with a matching iTableNum.
DAM_NOT_AVAILABLE - invalid iTableNum. Matching table not found.
DAM_FAILURE - Requested iTableNum > 0 and query is not a join.

See also

*damex_describeLogicExp