Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sql formatting linesize

551121Oct 13 2009 — edited Oct 14 2009
Hi, 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2009
Added on Oct 13 2009
5 comments
533 views