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

Home -> Community -> Usenet -> c.d.o.tools -> Re: arrow keys in SQL

Re: arrow keys in SQL

From: Latka <latkaSPAM_at_spamcotse.com>
Date: Tue, 24 Jul 2001 01:08:18 -0400
Message-ID: <tlq0lv5t5pck73@corp.supernews.com>

In article <BQ177.32512$ZF5.2053520_at_bin3.nnrp.aus1.giganews.com>, "Brian Janko" <brian_at_jankononet.spamcom.invalid> wrote:

> In most shell programs, you can use the up & down arrow keys to get back
> your previous commands. However, when I open my shell program to
> connect to SQL Plus, I lose this ability. Does anyone know how to set
> this up in SQL Plus?

It's probably easier to write a simple shell script to log into SQL Plus and do the query, at least I find it easier.



#!/bin/sh
# Shell comments start with a #
# Everything between '<<' and 'end' will be sent
# to the SQL Plus session as is.

sqlplus -s user/pass << end

set lin 132
set pages 60

SELECT foo, bar
  FROM foobar
 WHERE foo = 'foo'
   AND bar = 'bar';

end



Be sure to make the script executable (chmod a+x foobarquery.sh).
-- 
Latka;
Received on Tue Jul 24 2001 - 00:08:18 CDT

Original text of this message

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