Using QMF

Defining example elements

An example element is a symbol that is used to represent data in a column. It must appear in a named column before it can be used with a column function (AVG., COUNT., MAX., MIN., SUM.) in an unnamed column.

In this book, an example element is usually similar to the name of the column to which it refers. For instance, an example element in the SALARY column might be _S, _SAL, or _SALARY. Similarity is not necessary, however. Someone accustomed to writing algebraic expressions might want _X and _Y as example elements.

For example, the following query defines _S as "any salary". Then, in the unnamed column, it calculates and selects the average of all the salaries in the Q.STAFF table. ( ENLARGE command shows how to add an unnamed column to your example table.)



Q.STAFF | ID | NAME | DEPT | JOB | YEARS | SALARY |            |
--------+----+------+------+-----+-------+--------+------------|
        |    |      |      |     |       | _S     | P. AVG. _S |

If you use an example element, put it in your query at least twice. Put it in once to define it in the example table, and one or more times in writing conditions or calculations, either in the example table or in a conditions box.

Rules for example elements

An example element must start with an underscore character (_).

Following that can be any string of letters and digits up to 17 characters.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]