To add or delete lines in an SQL statement, use the Insert
or Delete function keys.
Procedure
Choose one of the following options, depending on whether
you want to add or delete lines from an SQL query:
- To add new lines to an SQL query:
- If you did not save the query in the database, display
the query again by entering SHOW QUERY on the QMF command line. You can also display
the query by pressing the Query function key. If you saved the query
in the database, enter DISPLAY QUERY queryname.
- Move the cursor above the place where you want to add
information.
- Press the Insert function key. QMF displays
a blank line.
- Type the information on the blank line.
For
this example, add a condition to select only employees from Department
38:
SELECT NAME, YEARS, SALARY
FROM Q.STAFF
WHERE DEPT=38
ORDER BY NAME
- To delete a line, move the cursor to the line you want
to delete, and press the Delete function key.