sql*plus output a mess

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?
Who is Participating?
Naveen KumarConnect With a Mentor Production Manager / Application Support ManagerCommented:
use toad or pl/sql developer which have easy options to generate csv files.
Naveen KumarProduction Manager / Application Support ManagerCommented:
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 ...

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

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

pma111Author Commented:
you may wish to chip in on this question http://www.experts-exchange.com/Database/Oracle/Q_28369582.html
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.