The National Archives NDAD
Print page Close window
 

Help

Simple queries

 
Help Glossary Frequently asked questions Contact us Site map  

To devise a simple query, pick a field from the second drop-down menu. To set the criteria for filtering the records, you need to apply a comparator and a value to the field. A third drop-down menu provides a list of the following comparators for you to use:

Is less than  
Is less than or equal to  
Is equal to  
Is greater than or equal to  
Is greater than  
Is not equal to  
Is missing This does not require a value to test against. Fields which are missing fail every other test except is not equal to. It is only true if the field is set to its special missing value(s). A field can have several missing values designated, with different 'meanings'.
Contains This searches for the presence of a stated character string in any part of the field, in either upper or lower case (for example, 'man' will match all expressions containing 'man', including 'man', 'woman','many' and 'Manchester')
Matches This allows you to set a more general value to the search. Values can involve the Extended Regular Expression matching rules, an explanation of which can be found in the help notes on Regular Expression Matching Rules.

The last stage of creating the query is to select an appropriate value, or character string, to compare against records in the chosen field. This value is entered into the fourth box on this page. The value you select can be of any format, i.e. numerical or textual, but it must match the datatype of the field.

Examples of Simple Queries

Field Comparator Value
Region is equal to NW This will only find records where the field Region has the value 'NW'
Count is greater than 55 This will only find records where the field Count contains a value greater than 55

There is also the option to combine several of this sort of test together, to make a more specific query. This is done by defining both the tests in the way described above, and joining them together using AND , OR or AND NOT operator which can be found in the first box on this page. The result of this is to make the query either more selective (if both tests have to be fulfilled for a record to be displayed), or more general (if either one or the other of the tests has to be fulfilled).

Examples of Combined Queries

Region is equal to NW AND Count is greater than 55 This query will only find records where BOTH the field Region has a value of 'NW' AND ALSO the field Count contains a value greater than 55.
Region is equal to NW OR Count is greater than 55 This query will find records where either the field Region has a value of 'NW' OR the field Countcontains a value greater than 55.
 
 

NDAD v3.0

 
 
Go to top of page Print page Close window