The National Archives NDAD
Print page Close window
 

Help

Using the Query Builder

 
Help Glossary Frequently asked questions Contact us Site map  

Once you have decided which Table you want to view, and clicked Browse data on the Table description page, there are several different ways in which you can view the data:

  1. You can view all the fields in a table sequentially starting at the first record.
  2. You can choose only those fields in which you have a particular interest. You may then view all records sequentially, displaying only the chosen fields.
  3. You can combine fields from one or more related tables and view them sequentially.
  4. You can use a query to filter the data, so that only records matching your criteria are displayed.

The Query Builder allows you to tailor your query using 4 tab buttons at the top of the Query Builder panel. You may build your query by using these tabs in any order, and you can modify it at any time after it has been executed by clicking on any of the tabs.

Browsing data

From the Table description page click on Browse data. You will be taken to the Query Builder panel. The Display options tab is selected.

Viewing all data in a table sequentially

Click on Display data in the bottom right hand corner of the panel. You can use the control line next to the Display data button to change your display options.

Choosing fields to display

To choose particular fields for viewing, click on the Fields tab. Select the field(s) you want by moving fields between the two list boxes. Note that the fields will be displayed in the order they occur in the table, not in the order in which you selected them.

Now you can view the data by clicking Display data.

Choosing fields from related tables

Some tables are defined as being related to others within the same dataset, enabling you to choose fields from more than one table at a time, if the tables are related by clicking on the Related Tables tab. Any tables related to the one you are currently analysing will appear in the Available Tables box. Add or remove tables by using the boxes provided. Fields from selected tables will then be available in both theFields panel and the Selection Criteria panel.

Now you can continue to view the data by clicking Display data.

How the data is displayed

Once you have clicked on the Show button the first page of data is displayed. When browsing a table, the 'Row #' column displays the match number with the record number alongside in brackets. The match numbers will always be sequential as they represent the data being displayed. The record numbers represent the index of the record in the as a whole, so if you have entered a query which returns less records than are in the table, some of the bracketed record numbers will differ from the match numbers.

Example of NDAD data display

In the example above we can see that the record where GEOG = ENGLAND is the 7th matched record, but the 56th record in the table.

To improve readability, columns are shaded/ information appears at the top of this first page. Your selection criteria are also displayed.

You can use the links on the page to step up and down, one row at a time or one page at a time). If you have chosen more columns than will fit on the page, you can also step left and right using the row and column controls provided.

Missing values in the fields will be displayed in grey. It is possible to have several missing values designated for one field, and if available, a relevant explanation of the missing value is provided. If not, an asterisk (*) is displayed.

Modifying the display

You can change the appearance of your output at any time, using theDisplay options control line which appears at the top of your output display. Choose from the drop down menus and then click on the Display Data button. The data will appear in the new format starting at the page being displayed at the point when you decided to change things.

Rows and colums. You can decide how many rows of data you wish to see displayed on a page at one time. You are given options from 1 to 200 rows. Select your preferred number of rows from the drop-down menu in the control line of theDisplay options panel.

Scrolling or static display. Many newer web browsers support embedded, scrolling frames. If your browser supports this feature, we recommend you use this when viewing your results. If your browser does not support this feature, or if you prefer not to use it, the data will be displayed as a simple table in your web page. This may result in extremely long or wide web page.

Translate coded data. You have the option as to the format in which you will see any coded fields in the data. By default, these codes have already been translated into a format which can be easily understood. If, however, you wish to see the original codes, select Leave coded data from the menu in the control line of the Display options panel.

Output format: The default output format is HTML, which will present your output on screen as a web page. You may alternatively choose to download the data in CSV format (comma separated variables), which can be saved on your PC and later reused in other applications (e.g. MS Excel). Column headings but not row numbers will appear in the CSV file generated.

Querying the data

You can select records using either aSimple Query or an Advanced Query. When you click on the Selection Criteria tab for the first time you will be presented with the Simple Query panel as default. You can build up your query from the options provided. Use the More/Less options to build longer/shorter queries and the Reset option to start afresh. You can choose the Advanced Query option at any point and your simple query will be redisplayed into advanced format. However, if you change from Advanced Query to Simple Query it may not be possible to translate your advanced query back into a simple query.

After executing a query, you can modify it by clicking on Selection criteria: you will find your query (simple or advanced) in the state in which you left it. Modify appropriately and click on the Display data button to run your revised query.

 
 

NDAD v3.0

 
 
Go to top of page Print page Close window