I swear I did this all the time and today, for some reason, I can no longer do this. To bring up a query I may want to edit, I click File and then OPen while in SQL PLus. I choose the correct SQL file and it opens up in the SQL Plus window. If I want to run as is, I would type a /. If I wanted to make changes, I would type ED, edit the file, then exit out. My changes would be there.
Now I get this message when I try to open a file:
SP2-0423: Illegal GET command
The GET command will place the contents of the file into the SQL*Plus buffer. Spaces can be used if the path is surrounded by double quotes (").
Also, by using ED and the slash (/), you are actually only working with the buffer, which is the last statement executed in SQL*Plus. To manipulate the file, you must specify ED <path/filename> to update the file and @<path/filename> or START <path/filename> to execute the script.
Thank all of you for your suggestions and comments! I typed in Get and my file name in quotes. By George, the SQL statement came into my buffer as expected. I figured out why the File>Open is not working on this file. There is a space in the middle of the file name. I tried File>OPen on another file without the space, and my Sql was copied into the buffer like normal.
My filename is called S:\HRIS\PPLESOFT\SCORECARD\MISC SQL\blahblah.sql
That space through me off. I can either rename the file to MISC_SQL or I can use the handy Get command with quotes around the filename.