Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Trimming

Author  Topic 

NeilC
Yak Posting Veteran

55 Posts

Posted - 2006-08-08 : 13:42:27
Im exporting some data into a text file through a DTS package to automate a process. when the text file is generated, it is adding some spaces to the values, this is 1 record:

"C","28958               ","FEDEX Employees Credit Association                                         ","3955 Airways Blvd.                                                                                                                                    ","Memphis                                                                    ","                                                                           ","TN                                                                         ","38116                                             ","US                                                                         ","30351001                                          ","                                                                                                                                                      ","                                                                                                    ","                                                                                                    ","                                                                                                                                                                                                                                                               ","24 Hours                                                                                                                                                                                      ","Walk Up                                                                                                                                                                                       ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","1                                                                                                                                                                                             ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","FEDEX Employees Credit Association                                                                                                                                                            ","Cash Dispenser                                                                                                                                                                                ","                                                                                                                                                                                              ","                                                                                                                                                                                              ","                                                                                                                                                                                              " 


How can I remove all the unwanted spaces during the export?

ocary
Starting Member

12 Posts

Posted - 2006-08-08 : 14:21:45
What data type are the fields you are pulling? Char? Look at the rtrim() function.
Go to Top of Page
   

- Advertisement -