I write UNIX shell script to invoke SQL*Plus to run SQL queries.
The query results will be spooled to a file, i.e. the report.
However, I found that the field length of a column in the report
is the same as that in a db table, all the blanks are also output
to the report. This wastes a lot of harddisk spaces.
For example, if a text field is 256 characters long in the table,
it will be also 256 characters long in the report,
although there are only 20 characters of data, while others are blanks.
This really wastes a lot of spaces and increases the report size greatly.
I know only the "set trimspool on" command to trim the trailing blanks of a row.
I am looking for a method to "trim" all the blanks in all columns.
Please give me a helping hand.