Using Logical Operators

Character

Operator

Explanation

Example

Queries For

/

Contains

Contains a given string.

/Contrast

Procedure descriptions with the word Contrast.

\

Does not contain

Does not contain the given string.

\Contrast

Any string that does not contain Contrast.

|

Or

Disjoins the expressions on either side of the operator.

x or y

Returns data that contain both x or y, but not both.

&

And

Conjoins the expressions on either side of the operator.

x and y

Returns data that contain both x or y.

General Guidance for Logical Operators

The following are examples of potential search queries using special characters and combinations of special characters.

Character

Operator

Explanation

x&y

x AND y

Returns data that satisfies both conditions.

x|y

is x OR y

Returns data that satisfies any of the conditions.

x&

x AND no condition

Returns data that satisfies x.

&x

No condition AND x

Returns data that satisfies x.

x|

x OR no condition

Returns everything.

|x

No condition OR x

Returns everything.

Logical Operators Samples

  • To find studies with image count less than 10 or image count greater than 1000: enter <10|>1000 into the Image Count QBE field.
  • To find studies with a Proc Description starting with DIG and containing BI: enter DIG&/BI into the Proc Description QBE field.

Related Topics

Advanced Query by Example Overview