This topic describes the operators that can be used to manipulate values in character fields.
When you enter anything in the Criteria cell or the Or cell, the is equal to (=) operator is assumed at the beginning of the text unless a different operator is specified. For example, if you enter Rotating Pump in the Criteria cell of a character field, GE Digital APM will assume that you want to return records where the value in that field is equal to Rotating Pump.
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.
The following table provides examples of operators that you can use to manipulate values returned in character fields.
Purpose | Operator | Example | Outcome of Example |
---|---|---|---|
Return records that have an exact value stored in a given field. | = | ='Rotating Pump' | Returns records where the field contains the exact value Rotating Pump. (See note) |
Return records that have one value or another stored in a single field. | Or | ='Rotating Pump' or 'Centrifugal Pump' | Returns records where the value stored in the field is Rotating Pump, and records where the value stored in the field is Centrifugal Pump. |
Returns records that do not have a specified value in a given field. |
Not != <> |
Not 'Centrifugal Pump' != 'Centrifugal Pump' <> 'Centrifugal Pump' |
Returns records where the field does not contain the value Centrifugal Pump. |
Returns records where a given field contains the specified value. | Like | Like '%Pump' | Returns records where the specified field contains the term Pump, preceded by any number of characters, such as Centrifugal (Centrifugal Pump) or Rotating (Rotating Pump). |
Returns records where a given field contains the specified value. | Like | Like 'Pump_' | Returns records where the specified field contains the term Pump, followed by any one character, such as 1 (Pump1). |
Returns 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. |
Returns records where a given field does not contain the specified value. | 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 (see note). | | (Pipe) | Like 'Bob|John' | Returns records where the field contains both the value Bob and the value John. |
Return records that contain any values in a given field. | Is Not Null | Is Not Null | Returns records where the field contains any value. |
Returns 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.