Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Boolean Operators
See Also
Programmer's Guide > OpenAccess ORM Classic (Old API) > Telerik OpenAccess ORM OQL Reference > OQL - Object Query Language > The WHERE Clause > Boolean Operators

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

Use the AND and OR keywords to specify multiple search criteria. Criteria can also be negated by using NOT. The following example uses the AND operator to combine two search criteria:

OQL Copy Code
SELECT *
FROM ProductExtent
WHERE unitPrice > 100 AND unitPrice <= 200
ORDER BY unitPrice

The above query finds all Products that have unit price more than 100.00 and less than or equal to 200.00. The following example uses the OR operator:

OQL Copy Code
SELECT product
FROM ProductExtent AS product
WHERE product.unitPrice <= 100 OR product.untPrice > 200
ORDER BY product.unitPrice

The above query finds all products that cost either less than or equal to 100 or greater than 200. The following example uses the NOT operator:

OQL Copy Code
SELECT product
FROM ProductExtent AS product
WHERE NOT(product.unitPrice <= 100)
ORDER BY product.unitPrice

The above query finds all products, which cost more than 100. 

See Also