Filtering Results of a QueryOften you are not interested in all records (rows) in a table. To narrow down your search select Use Filters in the query creation window. You will see a box with the title "Criterion A". This is the first criterion your results must satisfy to be included in the data table returned. You can add more criteria (named Criterion B, C.. etc) by pressing the Add Criterion button. To remove the criteria, press the rm next to its box. Each criterion panel has a drop-down list of columns you can choose to limit your results, as well as different ways of limiting them. The column names are in the format TableName.ColumnName. Each one will be unique to the database you are connected to, but multiple TableNamess can use the same ColumnNames. The ways to filter your query are: In the range The selected column must fall in between the range of values you supply. In the list The selected column must match one of the values you supply in the list box. Press the expand button to open up a larger list box. You can paste in to the list box from the system clipboard, using the standard procedure for your operating system. Is like This allows you to enter a string with wildcards to match only certain values for the selected column. The appropriate wildcards are % for any match of any length and _ for any match of one character. For instance, if you enter "%Joe%", you will return any record that has the word "Joe" in it. If you enter "284_5", you will return any record that starts with 284, ends with 5, and has one character in between. 28405, 28415, etc as well as 284z5 would match. You can use any combination of % and _ you can imagine. Satisfies Equation Checks whether your selected column is equal to, not equal to, greater than, greater than or equal to, less than, or less than or equal to some input value. Is null This returns records for which the selected column has no assigned value. ExpressionFinally, you can choose how you want to evaluate your criteria using their names (A, B, C, etc...) and a boolean expression. The appropriate boolean operators are AND This is the default operator between each criterion. It means only return a record if both the criterion to the left and the criterion to the right of AND are true. OR If either the criteron to the left or the criterion to the right of OR is true the record will be returned. NOT Place this before a criterion to require the critereon to be false for a return. This can be used anywhere in the expression. Expressions can be grouped with parhenteses. Example: "(A AND B) OR (C AND NOT D)". |