Solved

sql*plus output a mess

Posted on 2014-02-20
3
451 Views
Last Modified: 2014-02-20
I have asked our DBA to run a query
spool c:\report.csv
select * from mytable

however, the output is a complete unreadable mess, not aligned into a

column 1 column 2 column 3
-------------------------------------------------

type format. Is this common qwith sql*plus. Is there anyway within sql*plus to get the results into a readable format, or are you better with an alternative tool?
0
Comment
Question by:pma111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 500 total points
ID: 39872940
use toad or pl/sql developer which have easy options to generate csv files.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 39872945
if you wanted to do it with sql*plus, then prepare the query in the format as given below accordingly and then try to see if that can help.

you will also have to setup column headsing, page, lines with the SET sql*plus commands

set heading ...
set page ...
etc

select column1 || ',' || column2 || ',' || ....
from you_table

Kindly ensure that you use cast/to_char accordingly for date/timestamp columns as per your requirements.

Thanks,
0
 
LVL 3

Author Comment

by:pma111
ID: 39873026
you may wish to chip in on this question http://www.experts-exchange.com/Database/Oracle/Q_28369582.html
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

688 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