 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

28th March 2007, 04:02 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 988

|
|
|
SQL Plus command line: Arrow keys not giving previous commands back
Hi,
I am using Oracle 10g Express Edition on Fedora core 5 32+ bit os. The problem is when I use the SQL Plus command line to make SQL statements I can not get the previously typed command back at the prompt when I use the up and down arrow keys on my keyboard. This is quite easy when I am using a shell, but here with this Oracle command line interface it is not working at all. Here is the example as what actually is happening whe I press the up or down arrow keys.
SQL> drop table mailorders;
Table dropped.
SQL> ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A
Any suggestions ? Thanks............
|

28th March 2007, 06:30 PM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 318

|
|
|
This is not a feature of SQL Plus. The buffer only holds the current command, but has no history.
|

31st March 2007, 10:32 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 988

|
|
Quote:
|
Originally Posted by offcenter77
This is not a feature of SQL Plus. The buffer only holds the current command, but has no history.
|
Thanks mate.
|

31st March 2007, 12:11 PM
|
 |
Registered User
|
|
Join Date: Feb 2005
Location: Scotland
Posts: 445

|
|
|
You may already know this but "/" does the last command and "edit" opens the last command for editing, so you can change it and save it, then run the modified command.
Cheers
|

2nd April 2007, 01:02 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 41

|
|
|
Before starting SQL Plus be sure to do 'export EDITOR=vi' This ensures that vi is used as an editor.
Also, when on the command editing is possible:
SQL> l => gives listing of command
SQL> l2 => lists line 2
SQL> c/abc/def/ => substitute abc by def
SQL> a text => append text to current (or last) line
|

8th April 2007, 03:09 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 988

|
|
Quote:
|
Originally Posted by opasveer
Before starting SQL Plus be sure to do 'export EDITOR=vi' This ensures that vi is used as an editor.
Also, when on the command editing is possible:
SQL> l => gives listing of command
SQL> l2 => lists line 2
SQL> c/abc/def/ => substitute abc by def
SQL> a text => append text to current (or last) line
|
Brilliant, thanks a lot.
|

8th April 2007, 06:38 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 2,008

|
|
|
if you use gqlplus instead of sqlplus, you get bash-like history and completion (kinda cool pressing tab and getting table names completed!)
there is a way to get history using sqlplus, something to do with the termtype i think, if you don't want to use an editor.
|

12th May 2007, 02:21 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 988

|
|
Quote:
|
Originally Posted by sej7278
if you use gqlplus instead of sqlplus, you get bash-like history and completion (kinda cool pressing tab and getting table names completed!)
there is a way to get history using sqlplus, something to do with the termtype i think, if you don't want to use an editor.
|
Thanks very much....
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 12:10 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|