Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sql*plus output a mess

Posted on 2014-02-20
3
Medium Priority
?
462 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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 Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

636 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