Returns the query hint indicated by the input outline and hint number.
Hints are numbered from 1 to n. The first query hint has a hint number of 1. Each new query hint is added to the end of the list, with its number increased by 1.
Syntax
ESS_FUNC_M EssOtlGetQueryHint (hOutline, hintNum, numMembers, pMemberArray);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle (input). |
hintNum | ESS_SHORT_T | Query hint number (input). |
numMembers | ESS_SHORT_T | Number of members that the array provided is able to hold - usually the number of real dimensions in the outline (input) |
pMemberArray | ESS_PHMEMBER_T | An array of members for the hint. Usually the array has one member per real dimension, with NULL used for dimensions that are not part of the hint. This array needs to be allocated with size numMembers. (Output) |
Notes
Query hints enable you to influence normal view selection by informing Essbase about the profile of common queries.
This function is applicable only to Release 9.3 or higher aggregate storage databases.
Return Value
Returns 0 if successful.
Example
ESS_STS_T sts = ESS_STS_NOERR; ESS_HOUTLINE_T hOutline = ESS_NULL; ESS_SHORT_T nmHints = 0; ESS_SHORT_T i, j, hintNum; ESS_HMEMBER_T hMember[10]; /* (nm real dimensions) < 10 */ /* clear array just to be safe */ memset(hMember, 0x00, 10*sizeof(ESS_HMEMBER_T)); /* Code to assign hOutline variable omitted */ sts = EssOtlGetNumQueryHints(hOutline, &nmHints); if (sts) return sts; /* error out */ for (i = 0; i < nmHints; i++) { hintNum = i+1; sts = EssOtlGetQueryHint(hOutline, hintNum, 10, hMember); if (sts) return sts; /* error out */ for (j = 0; j < 10; j++) { if (hMember[j] != AD_NULL) { sts = EssOtlGetMemberInfo(hOutline, hMember[j], &pMemberInfo); if (sts) return sts; /* error out */ printf("Hint (%d), member (%d): [%s]\n", hintNum, j, pMemberInfo->szMember); /* Code to free pMemberInfo omitted */ } else { printf("Hint (%d), member (%d): [NULL]\n", hintNum, j); } } }
See Also