RE: Vertical align columns in sql*plus
- From: "Bobak, Mark" <Mark.Bobak@xxxxxxxxxxxx>
- To: "maureen.english@xxxxxxxxxx" <maureen.english@xxxxxxxxxx>, "orasnita@xxxxxxxxx" <orasnita@xxxxxxxxx>
- Date: Fri, 16 Jul 2010 14:24:29 -0400
A more flexible solution would be Tom Kyte's print_table procedure.
See here:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1035431863958
-Mark
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On
Behalf Of Maureen English
Sent: Friday, July 16, 2010 2:15 PM
To: orasnita@xxxxxxxxx
Cc: oracle-l
Subject: Re: Vertical align columns in sql*plus
Octavian,
I knew I saw something like this before, so I asked one of
my coworkers who writes a lot of reporting queries.
You can try using newline...
For example, run this query:
set lines 80
set pages 2000
set echo off
set verify off
set feedback off
set head off
column who newline
column dbase newline
column dspace newline
column tspace newline
column prof newline
select 'USERNAME: '||username who,
'DATABASE: '||name dbase,
'DEFAULT TABLESPACE: '||default_tablespace dspace,
'TEMPORARY TABLESPACE: '||temporary_tablespace tspace,
'PROFILE: '||profile prof
from v$database, dba_users
;
- Maureen
Octavian Rasnita wrote:
> Hi,
>
> Is it possible to align vertically the columns displayed in sql*plus
> like under SQLite by using .mode line or in MySQL by ending the query
> with \G?
>
> ...something like:
>
> <row1>
> column1: 1.23
> column2: "the value"
> column3: 0
> <row2>
> column1: 2.55
> column2: "another val"
> column3: 1
>
> Thank you.
>
> --
> Octavian
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 5280 (20100715) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Other related posts: