The default settings for page/screen capabilities in oracle are pretty pessimistic. The result is your output is wrapped down the left-hand side of your screen, with column headings repeated too frequently.
The defaults in sqlplus are 14 rows x 80-chars.
To change to, eg, 60 rows x 132-chars, use:
set PAGESIZE 60; set LINESIZE 132;
If your output has a column ‘Location’ that is too wide for your purposes, you can assign it a format via:
column Location format A20;
To list your current column formats:
To clear your current column formats:
To clear one specific column format:
column Location clear;
One way to create comma-separated or tab-separated files is to spool them from within sqlplus.
First set up neutral formatting:
SET PAGESIZE 0 SET NEWPAGE 0 SET SPACE 0 SET LINESIZE 80 SET ECHO OFF SET FEEDBACK OFF SET VERIFY OFF SET HEADING OFF SET MARKUP HTML OFF SPOOL OFF SET COLSEP ','
spool /tmp/output.csv SELECT ... spool off