sql formatting linesize
551121Oct 13 2009 — edited Oct 14 2009Hi, Need help,
I am spooling data from a database table (db-UTF-8) to a flat file.
I am setting line size as 170. But if data in table column is of length less than 170, it still shows trailing spaces.
I there any way I can remove those spaces (set by Linesize) without using TRIMSPOOL function. This is because table data has spaces also at the end of many lines.
For ex. if table row data is of length 150 with spaces at the end. I want to show file data with 150 characters only.
Not 170 as set in linesize
SET LINESIZE 170
spool &data_file_full_path
select data
from <table_a>
where file_id = 1001
order by line_number;
spool off