Grouping Queries

You can group queries together using parenthesis. For example, consider the following query:

{Tag name} = "A*" AND ({Type} = "AI" OR {Type} = "AO")

Database Manager evaluates this query from left to right. Expressions enclosed in parenthesis are treated as a unit. Consequently, as Database Manager evaluates the above query, it retrieves every block that begins with an "A." From this list of blocks, the program then displays all the Analog Input or Analog Output blocks.

Be careful where you place parenthesis in a query. The following query yields a very different spreadsheet compared to the query given above.

({Tag name} = "A*" AND {Type} = "AI") OR {Type} = "AO"

This query displays every Analog Input block that begins with an "A" and every Analog Output block in the database.

 

See Also

How Do I...