Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Edit a previous command

Re: Edit a previous command

From: Arto Viitanen <arto.viitanen_at_csc.fi>
Date: Thu, 17 Nov 2005 09:36:34 +0200
Message-ID: <437c3302$0$22412$ba624cd0@newsread.funet.fi>


milkyway wrote:
> Hello,
>
> Sometimes when I do a query, I make a mistake in typing in some
> characters.
>
> Then I have to do the whole query over and type in everything again ;-(
>
> Is there a way to edit what was previously typed in so that I don't
> have to do this?
>

It all depends on what operating system and tool you are making the queries. However, on Linux, Unix and Windows you can use Emacs (or I use XEmacs, since its Windows version is way better and on Linux it lets me edit bigger files, but that is another story) and SQL*Plus. Type emacs -f sql-oracle (or <Alt>x sql-oracle on Windows' XEmacs) and then type username, password and SID name. Emacs runs SQL*Plus on its own buffer, so you can edit the commands easily. Only problem is in connecting "SYS AS SYSDBA", since Emacs does not give "AS SYSDBA" to Oracle. However, it logs into the specified instance, where SQL*Plus prompts username and password. You can then type SYS AS SYSDBA to username. So what is the catch? Catch is, that password is echoed in this case.

--
Arto Viitanen
CSC, Finland
Received on Thu Nov 17 2005 - 01:36:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US