Developing Apama Applications > EPL Reference > Queries > Find statement
Find statement
A query find statement tries to find a match for the event pattern that the find statement specifies. When the query finds a match it executes the EPL in the find statement block.
When a find statement specifies a select or having clause, the every modifier is required. Conversely, you cannot specify the every modifier if you do not specify a select or having clause.
When a find statement specifies the every identifier, the identifiers in the select clause are available in the having clause and in the find block, but the coassignments in the pattern are not available.
Pattern coassignments are available in a where clause that applies to the pattern.
When you do not specify the every modifier, all pattern coassignments, except a without clause coassignment, are available in the find block.
In a where clause that is part of a without clause, pattern coassignments as well as the coassignment in the without clause are available.
Example:
find Withdrawal:w1 -> Withdrawal:w2
where w1.country = "UK" and w2.country = "Narnia" {
// Recent card fraud in Narnia against UK customers
emit SuspiciousWithdrawal(w2);
}
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.