Solved

sql*plus output a mess

Posted on 2014-02-20
3
435 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

861 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now