Special characters added with TRIM

General covers Articles, Reference documentation, FAQs, Downloads and Blogs that do not belong to a specific subject area. General-purpose Articles about everything and anything

Special characters added with TRIM

I am using fast export to create a file , when I CAST all the columns as CHAR then there is no issue but when I add TRIM to remove any space for all the columns then there are some special characters added in beginning of first column.
CAST (COL1 as char(10)) ||
CAST (COL2 as char(10))
AS CHAR (60)))

I am adding TRIM to remove any unused space .

Please suggest.
Teradata Employee

Re: Special characters added with TRIM

TRIM makes the value VARCHAR so the first two bytes of the output are a binary length field. 

You could write an OUTMOD to remove those two bytes, or use some utility to strip them from the file after the EXPORT completes.


Or just use TPT instead of FastExport, and specify that the output should be "Delimited".