EDIT
The EDIT command opens the text editor defined with the EDITOR set option
and, depending on the parameters passed, allows the user to modify a file
or a previously executed command.
After the desired modifications are completed, close the text editor.
If the item modified was a command, it will be executed by OdxSQL when
the text editor is closed. If the modified item was a text file, OdxSQL
does nothing.
The EDIT command will attempt to format the command copied into the editor.
For example:
select company, contact from customers where state='co' and
company='systems'
will display in the text editor as:
select COMPANY, \
CONTACT \
from CUSTOMERS \
where STATE = 'co' and \
COMPANY = 'systems'
Syntax
EDIT [ n | filename][WITH options]
EDIT
Required.
n | filename
Optional.
n is the line number from a HISTORY listing of previously
executed commands.
filename is the name of a text file to be edited.
If nothing is passed, the last command executed will be copied into the
text editor for modification.
WITH options
Optional. A comma separated list of options to apply to this command.
Options
There are no options available for use with the EDIT command. Support
was added for future releases.
Example
In the following example, a record is inserted into the customers table.
>insert into "customers" \
values (1, 'Dynamic Information Systems Corporation', \
'Mark S. Trasko', 'President', 'Mr.', '5733 Central Avenue', \
'', 'Boulder', 'CO', '80301', 'USA', '303 444-4000 x1300', \
'303 444-2230', 'DISC MST', \
'Sample prospect record for entry and annotation', 1)
1 row inserted into CUSTOMERS
>edit
The above command is copied into the open text editor and manually edited.
When the editor is closed, ODXSQL automatically executes the modified
command. The command is not echoed to the screen.
1 row inserted into CUSTOMERS
>
Top
|