The query specification model defines subquery filters by using the <subQueryFilter> XML element. See the SAP BusinessObjects Web Intelligence User Guide to learn the definition and benefits of subqueries.
<filterPart> <subQueryFilter operator="string" correctionType="None|Any|All"> <filterObjects> <filterObject id="string" path="string"/> ... <queryData> <resultObjects> <resultObject> ... <sortObjects> <sortObject> ... <filterPart>
The following table lists the possible values of the operator attribute, the number of operands the attribute accepts and if correlation is allowed.
Operator | operator Attribute Value | Number of Operands | Correlation Supported |
---|---|---|---|
Equal To (=) | EqualTo | One object | No |
Not Equal To (<>) | NotEqualTo | One object | Yes |
Less Than (<) | LessThan | One object | Yes |
Greater Than (>) | GreaterThan | One object | Yes |
Less Than or Equal To (<=) | LessThanOrEqualTo | One object | Yes |
Greater Than or Equal to (>=) | GreaterThanOrEqualTo | One object | Yes |
In | InList | List | No |
Not In | NotInList | List | No |
The following table show the correlation types allowed:
Correlation Type | correlationType Attribute Value |
---|---|
NONE | None |
ANY | Any |
ALL | All |
<filterObject> Attribute | Description |
---|---|
id | The object identifier used as filter |
path | The full path of the object in the universe |
The following snippet of a query specification shows a subquery filter with no correlation.
<query xmlns="http://www.sap.com/rws/sl/universe" id="5897899822041415615" dataSourceType="unx" dataSourceId="5808"> <querySpecification version="1.0"> <queryOptions> ... </queryOptions> <queryData> <resultObjects> <resultObject path="Time|folder\Calendar|folder\Calendar Year|dimension" id="_IBo8FLIhEeCk0Ylv-tlF2Q"/> <resultObject path="Customer|folder\Geography|folder\Continent|dimension" id="_IBo8M7IhEeCk0Ylv-tlF2Q"/> <resultObject path="Customer|folder\Geography|folder\Country|dimension" id="_IBo8NrIhEeCk0Ylv-tlF2Q"/> <resultObject path="Sales Revenue|folder\Net Sales|measure" id="_IB8eRLIhEeCk0Ylv-tlF2Q"/> </resultObjects> <filterPart> <subQueryFilter operator="EqualTo" correlationType="Any"> <filterObjects> <filterObject path="Customer|folder\Geography|folder\Continent|dimension" id="_IBo8M7IhEeCk0Ylv-tlF2Q"/> <filterObject path="Customer|folder\Geography|folder\Country|dimension" id="_IBo8NrIhEeCk0Ylv-tlF2Q"/> </filterObjects> <queryData> <resultObjects> <resultObject path="Customer|folder\Geography|folder\Continent |dimension" id="_IBo8M7IhEeCk0Ylv-tlF2Q"/> <resultObject path="Customer|folder\Geography|folder\Country|dimension" id="_IBo8NrIhEeCk0Ylv-tlF2Q"/> </resultObjects> <filterPart> <comparisonFilter operator="GreaterThan" path="Sales Revenue|folder\Net Sales|measure" id="_IB8eRLIhEeCk0Ylv-tlF2Q"> <constantOperand> <answerValue dataType="Numeric">300000000</answerValue> </constantOperand> </comparisonFilter> </filterPart> </queryData> </subQueryFilter> </filterPart> </queryData> </querySpecification> </query>