Producing a pipe-delimited file using SQL*Plus
595007Dec 11 2008 — edited Dec 11 2008This script
set colsep '|'
spool outfile.lst
select fname,lastname,midinit from mytab;
spool off
produces this outfile.lst
john |doe |A
richard |roe |B
In other words, it pads the names with blanks up to the width of the column, 9 characters, even though the data is varchar.
I would like to get variable length fields, without blank padding, like this
john|doe|q
richard|roe|x
Can I do this in SQL*Plus by setting system variables or the COLUMN command?
-- Chris Curzon