extract to csv -spaces at end of record depending on the set linesize param
I'm running a query to extract a table to a csv file and need to eliminate all of the trailing spaces on the final record. I appears as if the number of trailing spaces is based on the record length versus the defined linesize. Is there a way to eliminate all of the trailing spaces without playing with the linesize for each query?
example:
spool foo.csv
set linesize 400;
select company || ', ' || location from schema.sometable;
spool off;
In the above example if the company field is 30 characters in length then the location field will be 370 characters in length--even if I use the trim command.