12. Report-Writer Statements : Report Setup Statements : .Query Statement for QUEL Users
 
Share this page                  
.Query Statement for QUEL Users
This statement specifies a QUEL query to be used to generate data for a report.
The .query statement for QUEL has the following format:
.query|.quer
{range_statement(s)}
retrieve [unique] (target_list) [where qual]
    [sort by | order by...] sort-list
The parameters for the QUEL .query statement are as follows:
range_statement(s)
Valid QUEL range statements used to identify the tables used in the query.
target_list
A valid QUEL target list that creates data for the report. The retrieve into form of the retrieve statement is not used.
qual
A valid QUEL qualification to a query.
sort_list
A valid set of sort columns according to the rules for constructing QUEL retrieve statements. Note that you cannot use both a .sort statement and a sort by or order by clause in the same report specification.