Home » Other » Client Tools » how to tweak SQL*Plus to change the way line numbers are displayed (Oracle 10g Release 2)
how to tweak SQL*Plus to change the way line numbers are displayed [message #481414] Wed, 03 November 2010 06:19 Go to next message
alamsiddiqui
Messages: 13
Registered: April 2010
Junior Member
Hello everyone,

We use _user @ _connect_identifier combination as our sqlprompt so that we won't forget which database we are currently working on. It appears as shown below.

Username@Sid>select column1
  2  from
  3  table2;


As you can see, this is sometimes very annoying when we want to use text block selection of any previously entered query. What I want is the query to appear like this:

Username@Sid>select column1
      2      from
      3      table2;

How can I do that? Please answer. And yes, I want to keep those line numbers. And I did google it but couldn't find a solution.
Re: how to tweak SQL*Plus to change the way line numbers are displayed [message #481415 is a reply to message #481414] Wed, 03 November 2010 06:31 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
I don't believe it's possible.
Re: how to tweak SQL*Plus to change the way line numbers are displayed [message #481416 is a reply to message #481415] Wed, 03 November 2010 06:38 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
You could set the SQLNUMBER to off, so that the normal prompt is displayed in every line. Of course, then you lose the line numbers.

SQL> set sqlprompt someone@somewhere>
someone@somewhere>set sqlnumber off
someone@somewhere>select 1
someone@somewhere>from dual;

         1
----------
         1

someone@somewhere>

[Updated on: Wed, 03 November 2010 06:39]

Report message to a moderator

Re: how to tweak SQL*Plus to change the way line numbers are displayed [message #481417 is a reply to message #481416] Wed, 03 November 2010 06:59 Go to previous message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Put a return after "select" so that all the actual bits of the code are aligned and all you need to do for a re-run is type SELECT then paste in the copied columns/code block

So rather than

XXXXXXXX@YYYYYYY> select dummy
  2  from dual;

D
-
X


you get

RO_335592@bi02pbir > select
  2  dummy
  3  from dual;

D
-
X


Pretty weak but its all I can think of right now.

Be interested if its a settable parameter but I'd be surprised Smile
Previous Topic: 2 Sessions for one connection ?
Next Topic: Previously executed block
Goto Forum:
  


Current Time: Fri Mar 29 02:27:11 CDT 2024