Using QMF

Writing a template SQL statement

You can write a template SQL statement that can accept different values for the column names and row conditions. For this scenario, create the following query and save it as SENIORSTAFF:

SELECT &SELECT1
FROM Q.STAFF
WHERE &COND1

This query allows the user or a procedure to specify the column names and row conditions just before running the query.

Using a procedure, you can assign values to the QMF query substitution variables (&SELECT1 and &COND1) by using one of the following procedures:

Both of the procedures that are described in this scenario produce the same results.


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