Dips > Data Processing > Query Data

# Query Example 5

This example demonstrates the use of the AND operator to search for a range of values in a single column.

SPACING,M > 0.5 && SPACING,M < 1.5

1. Select Query Data from the toolbar or the Analysis menu.

2. Create the Expression SPACING,M > 0.5

3. Select the Expression button.

4. Select the AND button.

5. Create the Expression SPACING,M < 1.5

6. Select the Expression button.

7. Select OK.

For the example.dip file, this query should create a new file with 15 rows.

- All values in the SPACING column are > 0.5 and < 1.5

More Range Examples

To find multiple ranges in a single column e.g. (a , b) , (c , d), a query of the form:

(COLUMN > a && COLUMN < b) || (COLUMN > c && COLUMN < d)

could be used.

To find values OUTSIDE of a range (a, b), a simple query of the form:

COLUMN < a || COLUMN > b

would do the job.