The following example selects two rows from the Employees table, and selects the job type using a variable that you must define. The results are then ordered by employee name.
SELECT emplNo, emplName FROM Employees WHERE emplJob = 'varJob' ORDER BY emplName
Employees
table to display the individual table rows.
emplNo
and click the Select button.emplName
and click the Select button.emplJob
and click the Where button.emplName
and click the Order By button.WHERE emplJob
in the SQL text area and type ='varJob'
(include the equal sign).
'varJob'
by clicking the Plus (+) button in the Variables area and entering the following values in the Name, Default Value, and Run-Time Value columns: varJob
, CLERK
, Request("job")
.