1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Edit file in sql

Discussion in 'SQL PL/SQL' started by ashay, Apr 20, 2009.

  1. ashay

    ashay Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    hi frends,,

    m hea with my new prob..

    i use oracle 9i. .ther is prob iritatng me,
    whenever i give edit command on sql prompt , afiedt.buf which is supposed to be open is not opening.. for that every time eithr i hav to copy n paste or hav to write whole query again..
    y dis is happening? re-installation ofcos can fix but without doing that is ther any other way???
    awaitng reply..
    thnks n regards in advance...
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    hi Ashay

    Chill there is nothing to worry about dear old ed... (i am in a nice mood today.. ;) )

    I am assuming you are on windows so my instructions are for windows.

    Ok so the first thing to do is

    1. Open SQL plus, and connect to oracle
    2. Type the following at the SQL Prompt
    Code (Text):

    define _editor=notepad
     
    3. Now try the ed or edit command.

    If this doesn't work.

    1. Right Click My Computer on Desktop
    2. CLick Properties-->Advanced-->Environment Variables
    3. There will be two boxes one for user variables at the top and one system variables at the bottom.
    4. In the system variables, you will have a variable called PATH, click on edit.
    5. Add C:\Windows\notepad.exe after a semicolon.
    6. Now again login back to SQL Plus and give the command
    Code (Text):

    define _editor=notepad
     
    7. Now type ed and see.

    If it still doesn't come, you might have a problem with notepad. You can install another editor and put it in the PATH variable as above. (In that case you also have to copy that editor's exe to system32)

    Let me know if you run into any problem.
     
  3. simply_dba

    simply_dba Forum Advisor

    Messages:
    95
    Likes Received:
    5
    Trophy Points:
    140
    Location:
    Kolkata, India
    For unix use