OurTown2000 Query Handbook - To Modify a Query

<-Back (To Modify a Query-The Filter Building Dialog) Table of Contents Next (To Modify a Query-Picking Group and Summary Fields)->

Selecting Fields to Show in Query

 

When you design your query, you need to think about what you’d like to appear in the results. In most cases you won’t need to see every field in the database.

 

The Select Fields to Show In Query dialog is where you specify which fields you want to see when the query is run.

 

You will be shown this dialog the first time you press Select on a query you have highlighted in the Query List Manager.  

 

If you select a query that has already been assigned fields,  you will be taken directly to the Query Overview Dialog.

 

By pressing these buttons, you can select fields to appear in your query results:

 

Button

Action

 

 

Selects all fields to display in the query results.

To select a single field, you can either:

·     Double mouse click on it.

·     Use the arrow keys navigate to it and then press the Enter key.

To unselect a field, just repeat this action on the selected field.

Unselects any fields in the set of fields to include in the query results.

Displays the Select Group Field Type dialog which gives you two organizing functions:

·      To break up your query result into subgroups.

·      To calculate and show summary information on selected fields.

(For more information, see the next section, Picking Group And Summary Fields.)

Saves your selected fields and takes you to the Query Overview Dialog.

Exits this dialog without saving any changes that you made.

Displays descriptive help text.

 

Selecting Output Fields: An Example

 

Suppose you want to provide your best sales person with a list of recent contacts for a telephone-based sales campaign. For the output you will want to see Contact person's name, customer number, company name and phone number.  Here are the steps for specifying the output fields for this example:

 

1.    In the Query List Manager, highlight the query you want, then press the Select button.

       If this is the first time you selected this query, you will see the field selection dialog to the left.  If you have already selected output fields, you will be taken directly to the Query Overview Dialog. 

       If that happens, press the Edit output fields button to go to this Select Fields to Show in Query dialog.

 

2.   To select the fields you want, move the mouse cursor over the Fields to pick from list (left side of screen).

3.    Double click on each of the fields you want to select:

·     Contact person’s name

·     Customer number

·     Company name

·     Phone number

 

As you double click on each of the desired fields, OT2 Query Maker lists them in Fields to include in query (right side of screen).

 

 


Changing the Order of Output Fields

In the course of selecting output fields, you may wish to change their order or position.  In a report, the order of the vertical columns displaying your query's data is determined by the order of fields that you have selected.  You can change the order in the following ways.

 

  Using the mouse:

1.   Select a field by clicking on the button to its left.

2.   Drag the field to its new position and release the button.

     

 Using the keyboard:

1.   Use the tab or arrow key to highlight the field you want to move.

2.   Hold down the control key while pressing an up or down arrow key until the field is in its new position, then release.

 

 

 

Selecting Output Fields When the Query has been Selected Previously

If the query has already been created and you want to change the list of output fields:

 

1.    Go to the Query List Manager and select the query you want to work with.

 

 

 

2.    In the Query Overview dialog, press  to display the previously selected output fields and make them available for editing.

 

 

 

 

       OT2 Query Maker will present the Select Fields To Show In Query dialog.

      The previously specified list of output fields differs from what you need right now. (For example, you don’t want State or Contact person's name.

 

3.    Eliminate the State and Contact person's name fields by clicking on them in the right side Fields to include in query column.

 

 

 

 

4.    Next, click on the move button to the left of the Year to date purchases field and drag it to the top of the list so it looks like this:

 

 


<-Back (To Modify a Query-The Filter Building Dialog) Table of Contents Next (To Modify a Query-Picking Group and Summary Fields)->

OurTown2000 Query Handbook - To Modify a Query