One Star

trim spaces from fields

Hallo,
my input table has fields (string) with a size of 25 if for example the name 'Hunter' is stored in that field
the rest of the field is filled up with spaces.
So the output is:
'Hunter '
and I want to trim it to get the following output
'Hunter'
The input table is a AS400 and I have only read access, the destination Database is Mysql.
I use tMap.

Greetings
Peter
3 REPLIES
One Star

Re: trim spaces from fields

Hi Peter,
I assume you are using tAS400Input step to read the input table. Then if the requirement is to trim all the leading and trailing spaces of the input column, then you can go to the "Advanced settings" tab of the component and enable "Trim" for the field.
Regards,
Abhi
One Star

Re: trim spaces from fields

Hi Peter,
Same info holds good for tMysqlInput component also. It has the same feature to trim the sting for desired column.
Go to tMysqlInput component --advanced settings---trim column check box
Thanks,
Prashanta Pathak
One Star

Re: trim spaces from fields

Thanks Abhi, I should open my eyes :-)