Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does my spool write each record seperate line

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
Why does this write each record on a separate line ?
(note; only a small sample of actual script)
sqlplus -S id/pass@sid << EOT >>/dev/null
set heading off
set pagesize 0
set linesize 132
set serveroutput off
set verify off
set feedback off
spool fileout
select vendor_name , vendor_alt
from vendors
order by 1
spool off

I can get all on 1 line if i use || but then I cannot use order by clause.
 
1. You may sort by columns not in your query:

Code:
select vendor_name || vendor_alt
from vendors
order by vendor_name

2. set linesize 132 is probably not enough for both fields and a delimiter between columns (you meant columns not records, didn't you?)

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top