Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Location
    Chesterland, OH
    Posts
    9

    Unanswered: Can't do File>Open in SQLPlus

    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:
    SQL>
    SP2-0423: Illegal GET command

    What happened

  2. #2
    Join Date
    Nov 2005
    Posts
    13

    re:

    Have you tried the following?

    eg.
    <SQL> get a:myfile.sql

  3. #3
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    I'm not sure what "get a:myfile.sql" would achieve?

    Could there be a space in the path?

    Can you drag the file into the SQL*Plus window from Windows Explorer? (Actually not sure whether that works in sqlplusw.exe as I never use it.)

    Not that it helps you, but sqlplus.exe is much nicer than sqlplusw.exe.

  4. #4
    Join Date
    Nov 2005
    Posts
    17
    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.

  5. #5
    Join Date
    May 2005
    Location
    Chesterland, OH
    Posts
    9

    My problem is solved!!!

    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.

    Thanks. No more tears.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •