On Mon, Nov 27, 2017 at 1:10 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I think there's a misunderstanding. Please tell me how using a COPY TO MyCSVFile TYPE CSV can be manipulated with a TRIM or ALLTRIM?
You *COULD* do it with the FIELDS clause, IIRC, but it's much more understandable if you use SELECT ... INTO CURSOR to do the preprocessing, data manipulation, reordering, filtering, etc with a Rushmore-izable query, then do a COPY TO TYPE CSV with the result.
The *best* way is to not put the trailing spaces into the varchar fields to begin with :)