Dips > Data Processing > Query Data

# Creating a Query

A query is created by using the buttons at the left of the Create Query area, to enter the desired information in the area to the right of the buttons.

1. The Expression button will enter the current Expression at the top of the Query Data dialog.

2. For more complex queries consisting of multiple Expressions, AND, OR and brackets ( ) may be used, as needed.

3. The Delete button can be used to correct mistakes (first click on the line you wish to delete in the Create Query area, and then select Delete, and the line will be removed).

NOTE:

- you may NOT type directly in the Create Query area, you must use the buttons provided.

- If you accidentally leave out part of a query as you are creating it, simply click the mouse on the line AFTER the line you wish to add, and then select the necessary button. (For example: if you enter two Expressions in a row, which would of course lead to an invalid query, click on the second Expression with the mouse, to highlight it, and then select the AND or OR button, as required. This will insert the missing operator between the two Expressions)

Once the desired query has been created, select OK, and Dips will search your file for all rows matching your selection criteria. If the query was successful, a new Dips file will be generated, and a new grid view will display the selected data.

The Create Query process is best illustrated by examples. See the Query Examples topic for instructions on how to create some typical queries.

Correcting Mistakes

Note that the Delete button in the Create Query area can be used to correct mistakes, if you accidentally enter an incorrect Expression. To delete a line in the Create Query area, click on the line with the mouse to highlight it. Then select the Delete button and the line will be removed.