Using the Apama Studio Development Environment > Using Query Designer > Creating queries in Query Designer > Adding query conditions > Adding query condition filters (where)
Adding query condition filters (where)
A query can specify a Boolean expression that must evaluate to true for there to be a match. This is referred to as a query condition filter. You can add zero, one, or more condition filters to a query.
To add a condition filter to a query:
1. In Query Designer, add the event inputs to the query and define the event pattern you want to find. See Adding query inputs and Adding query patterns.
2. In the Query Designer Conditions pane, click the down arrow next to the plus sign and select Filter (where).
3. In the New Query Condition Filter (where) dialog, enter a Boolean expression that refers to the events in the pattern of interest.
For example, consider a Withdrawal event followed by another Withdrawal event, both for the same account. You are interested in this pattern only when the country fields in the two events are different. Using the aliases w1 and w2 for the two Withdrawal events, the following Boolean expression specifies the filter: w2.country != w1.country.
4. Click OK.
Query Designer displays the new filter in a row in the Conditions pane. To modify the filter, select it and then click the Edit icon. To remove the filter, select it and then click the Delete icon . Also, the new filter is immediately added to the source code as a where clause in the find statement. If you modify the filter in the Source tab this is reflected in the Conditions pane in the Design tab.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.