Tuesday, March 27, 2012

export data without trailing spaces

Hello,
when I export data from a table to a text file, I get trailing spaces
if the data type in char. (This dosen't happen if the data type is
varchar). I can get rid of the spaces by using the trim() function on
every signle column. here is an example:
DTSDestination("first_name") = DTSSource("last_name")

My question is:
Is there any easier way to get ride of the training spaces for all
columns when exporing a table? It is too time consuming if I have to
type trim() for every single column in the table.
Thank you in advance,
EddyHi

You can create a trim string transformation for the columns you wish to
trim. Depending on what currently have you may have to remove them from the
current transformation and create a new one.

John

<eddiekwang@.hotmail.com> wrote in message
news:1103225990.307403.256040@.c13g2000cwb.googlegr oups.com...
> Hello,
> when I export data from a table to a text file, I get trailing spaces
> if the data type in char. (This dosen't happen if the data type is
> varchar). I can get rid of the spaces by using the trim() function on
> every signle column. here is an example:
> DTSDestination("first_name") = DTSSource("last_name")
> My question is:
> Is there any easier way to get ride of the training spaces for all
> columns when exporing a table? It is too time consuming if I have to
> type trim() for every single column in the table.
> Thank you in advance,
> Eddy

No comments:

Post a Comment