Unit 9. Crosstab queries (II)


The crosstab query wizard.

 

To start the crosstab query Wizard we need to be in the Database window in the Queries object.

click on the button in the Database window.

Select the Crosstab Query Wizard option in the dialogue box that appears.

The first window of the wizard will appear:

In this window we are asked to introduce the source of the query, the table or query where the data is coming from.

In the View section we can select whether we want to see the list of all the Tables, all the Queries, or Both.

If the query that we are creating needs to extract the data from all the records in just one table we use this table as the source, if this is not the case we need to define a normal query that combines the various tables, and this query will be the source of the crosstab query.

We click on the chosen origin name and click on the Next> button to go to the next window.

In this window the wizard will ask us to introduce the row heading. As we said before one of the group columns serves as the row heading and the other as the column header. If one of these columns could contain many different values and another very few, we will select the first as row header and the second as column header

To select a row header, click on the field and then on the button. On the transfer of the field to the Selected fields: list, an example of the result will appear in the bottom zone of the window; we have selected the Course hours field and we see that in the query a row appears for every different value in the Course hours field.

If we made a mistake with the field click on the button and the field will be removed from the list.

We can select up to three fields. If we select various fields there will appear in the result of the query as many rows as what there are different value combinations of these three source fields.

The buttons with double arrows are to send all the fields over in one go.

Next we click on the Next> button and the window that we will see on the next page will appear...



 

Page. 9.2

Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.