This topic describes the operators that can be used to manipulate values in text or multi-value character fields.
It is not necessary to enter the = operator at the beginning of the expression in a given cell. If you do not enter the operator, GE Digital APM will insert it automatically, but it will not be displayed. In addition, GE Digital APM inserts but does not display the text WHERE or HAVING before the beginning operator (either an implied = operator or an explicit alternate operator). This means that the SQL code will contain either a WHERE clause or a HAVING clause as a result of the text that you enter in the Criteria cell or the Or cell.
Multi-value character fields are stored like text fields. The values are stored as a continuous string, where each value is separated by the pipe (|) character. Therefore, instead of using the operators allowed for character fields, when querying on a multi-value character field, use the one of the available operators for text fields.
The following table provides examples of operators that you can use to manipulate values returned in character fields.
Purpose | Operator | Example Expression | Outcome of Example |
---|---|---|---|
Return records where a given field contains the specified value. | Like | Like '%Pump' | Returns records where the field contains the term Pump, preceded by any number of characters, such as Centrifugal (Centrifugal Pump) or Rotating (Rotating Pump). |
Return records where a given field contains the specified value. | Like | Like 'Pump_' | Returns records where the field contains the term Pump, followed by any one character, such as 1 (Pump1). |
Return records where a given field does not contain the specified value. | Not Like | Not Like 'Centrifugal%' | Returns records where the field value does not contain Centrifugal followed by any number of characters. For example, this would eliminate Centrifugal Pump, Centrifugal Pump A, and Centrifugal Pump1. |
Return records where a given field does not contain the specified falue. | Not Like | Not Like 'Pump_' | Returns records where the field value does not contain Pump followed by any one character. For example, this would eliminate PumpA and Pump1. |
Return records that have multiple, specified values stored in a given field. | | (Pipe) | LIke 'Bob|John' | Returns records where the field contains both the value Bob and the value John. This example applies only to multi-value character fields. |
Return records that contain any values in a given field. | Is Not Null | Is Not Null | Returns records where the field contains any value. |
Return records that do not contain any values in a given field. | Is Null | Is Null | Returns records where the field is empty. |
Copyright © 2018 General Electric Company. All rights reserved.