CONVERT command

The CONVERT command will convert the current query (viewed in either SQL or Query Builder editor) to the SQL view.

The original query (whether a named object in the database or a temporary object) is unaffected by this operation.

Syntax

To convert a query that is stored in a database:

>>-- CONVERT --------- QueryName -------------------------<<
            +- QUERY -+          (+- SUBSTITUTE = YES/NO --+

To convert a query currently in an open window (in temporary storage):

>>-- CONVERT QUERY ---------------------------------------<<
Parameter Description
QueryName The name of the query that is to be converted.
SUBSTITUTE Defines whether substitution should take place for query variables. Available options are:
  • YES. If you have variables in your query, QMF attempts to substitute values for them. If all the variables are defined (either with the &variable parameter or predefined global variables), no prompt panel is displayed. If QMF cannot resolve all the variables, it prompts you to enter required values.
  • NO. No variable names in your query are resolved.

Example

The following example converts the query that is in an open window (in temporary storage):
CONVERT QUERY (SUBSTITUTE=YES
The following examples convert the Q.STAFF query that is stored in QMF Catalog:
CONVERT Q.STAFF
CONVERT QUERY Q.STAFF