S/List User Manual

Introduction

S/List Overview

Starting S/List

S/List Report

S/List Query

S/TCL

Keystrokes

Appendix A

Appendix B

Appendix C - LIST Keywords

Back Home Up Next


 

Links on this page:
 

Creating Queries

Designing Queries

Editing Queries

Creating Queries

To create a new S/List query:

Select the NEW icon from the tool bar.

Select the S/List Query entry from the new entity window by highlighting S/List Query and clicking on the OK button or double-clicking on S/List Query. This will open the S/List Query wizard.


Figure 34: New Entity Window II

Alternative ways of creating a new S/List Query are:

1. Select the FILE menu and select New, then select S/List Query.

2. Hold down the CTRL key and press N to bring up new entity window, then select S/List Query.

Designing Queries

When you choose to create a query, it is recommended that you use the New Query Wizard. After completing the wizard, the query can be edited at any time. If at any point you do not decide to complete the wizard, click on the Cancel button, and confirm that you do not want to design a query.

SELECT TABLE

The first Query Wizard dialog box that appears gives you a list of tables and allows you to choose the table against which you will make the query.


Figure 35: Table List dialog box

After selecting the table, click on the Next button to progress to the dialog box following.

Alternatively, you can double-click on the table name to progress.
 

SELECT COLUMNS

The second wizard dialog box allows you to select the columns against which you wish to query.


Figure 36: Queried Columns dialog box

The Available Columns list box contains a list of columns belonging to the table that you selected. After highlighting a column, the Comparison operator must be selected. The Comparison types available to you in the Comparison pull-down menu are in Appendix A.

After selecting a column and the Comparison operator, you must enter a value or values against which the column will be compared. The Value or values can be user-defined or you can use the Value pull-down menu next to the value text box to use another column from the selected table.

For most of the comparison operators, you will only be required to enter a single value. For the Between comparison operator, two values must be entered - the lower value first, then the upper value.

Once the query is complete, click on the Add button to add it to the list of queried columns. You may create more queries and add them, and you may remove queries by highlighting them and clicking on the Remove button.

After selecting the table, click on the Next button to progress to the dialog box following.


SELECTION CRITERIA PRECEDENCE AND ORDER

The third wizard dialog box allows you to select the query precedence and define the order in which the queries are performed.


Figure 37: Selection Criteria dialog box

The third Query Wizard dialog box that appears gives you a list of the queries that you have created. Now, you have the ability to optimise the selection criteria. Two tools will allow you to do this.

The first tool allows you to group queries using parentheses. In addition, you can change the And/Or logic of the selection criteria. And logic is used by default, double-clicking on the logic toggles the value. See Appendix B for examples.

The second tool allows you reorder the selected query columns, thus giving the columns an order of precedence. The columns are queried from top to bottom, so records are filtered in the order of the columns. To change the order of the columns, click on the Reorder Selection Criteria button. The following dialog box will open:


Figure 38: Reorder Columns

The Current Order list box contains a list of the selected query columns. Highlight a column from this list box and click on the Add button to include this column in the New Order list box. This action puts the column at the bottom of the New Order list box. To undo a selection, highlight a column in the New Order list box and click on the Remove button. When all of the columns are in the New Order list box, click on the OK button.

After organising the selection criteria, click on the Next button to progress to the dialog box following.


SORTING OUTPUT BY COLUMNS

The forth wizard dialog box allows you to select columns by which the output of the query will be sorted. All of the table's columns are available for selection.


Figure 39: Sort By Columns

To sort the output by a column, select it in the Available Columns list and click on the Add button. The column will appear in the Sort By list and will have a green arrow pointing upwards in the icon. This indicates that the column will be sorted in ascending order.

To sort a column in descending order, click on the Descending check box then select the column as explained before. The icon will appear with a red arrow pointing downwards.

To undo the selection of a column, select it in the Sort By list, then click on the Remove button. The Remove All button will remove all of the columns from the Sort By list.

After sorting the output columns, click on the Next button to progress to the dialog box following.


QUERY NAME AND DESCRIPTION

The penultimate wizard dialog box lets you enter the query name (which must be unique) and the description of the query.

It is advised to ensure that the query name is descriptive and that the description gives full details of the query. This makes it much easier for other people to understand and maintain the queries that you have created.


Figure 40: Query Name and Description

After entering the query name and description, click on the Next button to progress to the final dialog box. The final dialog box simply indicates that you have completed the wizard. Click on the Finish button to complete the Wizard.


Figure 41: Finish and Save dialog box II


Editing Queries

There are two situations where you can edit queries:

Once you have completed the query creation wizard, you are brought to the query properties dialog box of the query that you have just created and saved.

Click on the Open icon in the S/List workspace to open the Open dialog box. Then choose the query by its name to view the query properties dialog box.


Figure 42: Query Properties Dialog Box - Featuring the Query Details tab

The query properties dialog box consists of three tabs:

 

QUERY DETAILS TAB

This tab shows the query name and description. This information is editable.
(See QUERY
NAME AND DESCRIPTION
in "Designing Queries")

IMAGE ABOVE


SELECTION CRITERIA TAB


Figure 43: Selection Criteria tab

This tab shows the query selection criteria. This information is editable by way of adding and removing queried columns and by reordering selection criteria.

(See SELECT COLUMNS and SELECT CRITERIA PRECEDANCE AND ORDER in "Designing Queries")


SORT ORDER TAB

This tab shows the columns by which the output of the query is sorted. This information is editable.


Figure 44: Sort Order tab

(See SORTING OUTPUT BY COLUMNS in "Designing Queries")

[top]

Copyright © 2005 The Sprezzatura Group. All rights reserved.