Working with sql files
Use vi. You can create files in your home directory, then run them from sqlplus using the @ (or start) command.
A particularly useful technique is to start from oracle, and "drop" to your command shell using the bang:
SQL> ! vi mysqlfile.sql
edit away...
:wq
... and now you're back in SQL ...
SQL>@mysqlfile this runs your new file
OR! You use the ever-handy shell to run your sql for you like this...
shell--> cat mysqlfile.sql |sqlplus user/password >> output.txt
(but beware that this is insecure... )
Of course, you can always just copy from a windows-esque editor, and paste into sqlplus too.
Last Updated: 11/16/2004
Copyright Andrew LaMora
The Johns Hopkins University
3400 N. Charles St.
Baltimore, MD 21218