Import Table - Remove Spaces

Tieval

Still Clueless
Local time
Today, 17:07
Joined
Jun 26, 2015
Messages
475
Hi,

I am happy using an import table from text file using TRANSFERTEXT to totally automate the function.

Unfortunately I have a large number of old text files that are more or less ASCI in their format, they will have data such as:

| 12345|abc | a123g | 12/05/2005| yes |

My simple question is; how can I remove the spaces from all of the data I have imported? The fields break fine on the '|' separator but my individual fields are littered with spaces.

Any help would be greatly appreciated.
 
Cant you use the | as a delimiter to import your data?
 
the split function will divide each line into an array of sub strings
the trim function (or ltrim/rtrim) will remove leading/trailing spaces for each substring

so depending how you manage the import/data collection these ideas should help

you could probably have a query to update each field to trim(existingvalue)
 

Users who are viewing this thread

Back
Top Bottom