Defining criteria

Top  Previous  Next

 

To define criteria, you may use the Criteria and Or columns of the Columns Pane.

 

In these cells you should write conditions omitting the expression itself. For example, to get the following criteria in your query:

 

WHERE (Field1 >= 10) AND (Field1 <= 20)

 

you should type ">= 10 AND <= 20" in Criteria cell of a Field1 expression.

 

Criteria placed in the Or columns will be grouped by columns using the AND operator and then concatenated in the WHERE (or HAVING) clause using the OR operator. For example, the this visual representation will produce the following SQL statement. Please note that criteria for Field1 is placed both to the Criteria and Or columns.

 

screens - criteria

Defining criteria

 

WHERE (field1 = 10) AND ((field2 < 0) OR (field2 > 10))

 

Some expressions may be of Boolean type, for example the EXISTS clause. In this case you should type "= True" in Criteria column of such expressions or "= False" if you want to place NOT operator before the expression.

 

Tip: You can write your query once by hand and then see how it will be parsed and represented visually.

 

See Also:

The Columns Pane