Solved

output

Posted on 2012-12-31
5
368 Views
Last Modified: 2013-01-16
This is the output of a query ...

Can I see in a nicer way
....


EDITION_NAME
------------------------------
SYS
WRH$_EVENT_HISTOGRAM_PK
WRH$_EVENT__3831133909_84           74230          73894 INDEX PARTITION

OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- -------------------
CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S  NAMESPACE
--------- --------- ------------------- ------- - - - ----------
EDITION_NAME
------------------------------
31-DEC-12 31-DEC-12 2012-12-31:03:46:55 VALID   N N N          4



72359 rows selected.

SQL>

also page by page display....
0
Comment
Question by:walkerdba
5 Comments
 
LVL 22

Expert Comment

by:Steve Wales
ID: 38733999
In SQLPlus you can change the default width of your output (which isn't going to help a whole lot for very wide output) from the default 80 by going

set linesize xxx

(where xxx is how wide you can go - 132, 200, whatever).

linesize can also be shortened to lines.

You can change the length of the page displayed by

set pagesize xxx

(where xxx is the height of your display and pagesize can be shortened to pages)

Also to display a "page" (based on pagesize) at a time:

set pause on

You can also do

set pause "Press Enter to contine...."

To prompt for the pressing of enter.

For extremely large output (like 70K+ rows), I often try to put the output into an Excel spreadsheet for ease of manipulation (unrelated to your question, but for wide and long output it's certainly easier to view
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 38734545
Hi, you can use the spool function to create an output file, like this:

spool <filename>
(your query)
spool off

If you want a CSV like output, you can set these options before you spool to a file:

set colsep ,
set pagesize 0
set linesize <somesize>
spool <filename>
etc.
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 38734592
In addition to above, sqlplus has pretty-printing capabilities. You have to describe columns, their width and type. For details look at the COLUMN keyword in http://docs.oracle.com/cd/B10501_01/server.920/a90842/ch13.htm#1007781 .
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 38735051
if this is for browsing through data, you might want to use a data displaying tool

you could install sql developer (part of the 11 oracle client installation)
the grid displaying the data formats your columns
http://docs.oracle.com/cd/E11882_01/doc.112/e12152/intro.htm#RPTUG10100

or go for a more expensive solution like Toad for Oracle
http://www.quest.com/toad-for-oracle/
0
 

Author Closing Comment

by:walkerdba
ID: 38784010
solved
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
use lov values 2 64
dbms_crypto.decrypt   errors out 6 35
pivot rows to columns 1 35
Using SQL*PLUS issue with where statement with trunc function 3 29
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question