DB2 graphic  QMF Version 8

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.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004