The WHERE clause can be used to specify the joining conditions that apply when multiple event streams are joined or to specify event filtering conditions.
Syntax:
where conditionExpression
The comparison operators =, <, >, >=, <=, !=, <>, IS NULL, and IS NOT NULL, and logical combinations using AND and OR are supported for a WHERE clause conditionExpression.
Note
Notes on using Virtual Data Windows
The rules below apply to the WHERE clauses that can be used to access information stored in a Virtual Data Window.
The rules below apply when designating records from the cache.
If records have already been designated, the rules below do not apply and rules can be described in the usual way.
Only key properties specified in the @VDW annotation can be specified to designate a record.
"=" is the only comparison operator that can be specified for key properties in a record designation.
Description example
M.code = T.code designates the record, and then comparisons are implemented for other items.
@VDW(cacheName='MARKET',keyProperty='code')
create window MarketWindow.isxtp:vdw() (code string, high int, low int);
select M.code from MarketWindow as M, TicketWindow T
where M.code = T.code and ( T.price > M.high or T.price < M.low)
The table below shows valid and invalid description examples for the above cache.
No | Description example | Valid/ | Explanation |
---|---|---|---|
1 | select * from MarketWindow where code = '1111' | Valid | "=" operation in relation to a key property |
2 | select * from MarketWindow where high = 1000 | Invalid | Invalid because a property other than a key property is specified in the WHERE clause |
3 | select * from MarketWindow where code > '1111' | Invalid | Only a key property is specified in the WHERE clause, but invalid because an operation other than "=" is implemented |