SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
F-2
Examples—FC
To terminate a command and to specify more than one editing command on a line,
separate the editing commands with a double slash (//).
When you have no further changes to make, press the Return key. The command
prints again to allow you to edit it again. To stop editing, press the Return key
without entering any editing commands.
After you modify the last line and accept it by pressing the Return key, the revised
command executes.
To abnormally end the FC command and leave the original command unchanged,
press the Break key or Ctrl-Y, or enter a double slash (//) in columns 1 and 2,
followed immediately by a Return key.
Examples—FC
To correct the last statement or command entered, use FC without text or a
number:
>> EXEUCTE SELSUPP USING ?ST = "CALIFORNIA";
^
*** ERROR from SQLCI [-10021] Syntax error.
>> FC
>> EXEUCTE SELSUPP USING ?ST = "CALIFORNIA";
.. CU
>> EXECUTE SELSUPP USING ?ST = "CALIFORNIA";
..
Press the Return key to execute the corrected version.
Suppose that you want to display information about a specific supplier. You enter a
query to select supplier number 4, and learn that the supplier number does not
exist. You then decide to list all suppliers, but want only five rows displayed at a
time.
>> SELECT SUPPNAME, CITY, STATE FROM INVENT.SUPPLIER
+> WHERE SUPPNUM = 4;
-- 0 row(s) selected.
>> SET LIST_COUNT 5;
To execute the query again but save typing effort, you can use the FC command,
specifying the relative position of the SELECT command in relation to the current
command, FC:
>> FC -2
>> SELECT SUPPNAME, CITY, STATE FROM INVENT.SUPPLIER
.
+> WHERE SUPPNUM = 4;
characters (Must begin with a nonblank character) replaces existing
characters with the specified characters one-for-one,
beginning with the character immediately above the first
character specified.