Bentley WaterGEMS CONNECT Edition Help

Specifying a SQL WHERE clause in ModelBuilder

The simplest form of a WHERE clause consists of "Column name - comparison operator - value". For example, if you want to process only pipes in your data source that are ductile iron, you would enter something like this:

Material = 'Ductile Iron'

String values must be enclosed in single quotes.

Column names are not case sensitive. Column names that contain a space must be enclosed in brackets:

[Pipe Material] = 'Ductile Iron' 

Brackets are optional for columns names that do not contain a space.

Supported comparison operators are: <, >, <=, >=, <>, =, IN and LIKE.

Multiple logical statements can be combined by using AND, OR and NOT operators. Parentheses can be used to group statements and enforce precedence.

The * and % wildcard can be used interchangeably in a LIKE statement. A wildcard is allowed at the beginning and/or end of a pattern. Wildcards are not allowed in the middle of a pattern. For example:

PipeKey LIKE 'P-1*'

is valid, while:

PipeKey LIKE 'P*1'

is not.