Splitting on the first space character
- FlowHeater-Team
- Topic Author
- Offline
- Admin
Less
More
13 years 8 months ago #2097
by FlowHeater-Team
Best wishes
Robert Stark
Splitting on the first space character - Post(2097) was created by FlowHeater-Team
Translated submission in the German forum. You can read the original entry
here
.
Greetings,
I am trying to split on the first space character of a field using the Trim function: e.g. in my address database there are postcodes followed by town name in the same field. Since they contain a mixture of 4 and 5 digit postcodes, dividing them assuming a fixed length (as in your example for this) is not possible. I seem to be on the wrong track and suspect I need a different function.
I’d be grateful for your help.
Roland
Greetings,
I am trying to split on the first space character of a field using the Trim function: e.g. in my address database there are postcodes followed by town name in the same field. Since they contain a mixture of 4 and 5 digit postcodes, dividing them assuming a fixed length (as in your example for this) is not possible. I seem to be on the wrong track and suspect I need a different function.
I’d be grateful for your help.
Roland
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Topic Author
- Offline
- Admin
13 years 8 months ago #2098
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Re:Splitting on the first space character - Post(2098)
The
Trim Heater
is for removing stray "white space" (spaces, tabs, new lines, etc.) from the beginning and/or the end of a string.
In order to divide a string into pieces on a separator character, you need to make use of the Split Heater instead.
Drag and drop two copies of the Split Heater onto the Designer window. Connect the field that contains the postcode and town name to the inputs of both Heaters. Next configure the Heater settings as follows.
Postcode
Search: <space character>
Return column: 0
Town
Search: <space character>
Return column: 1
The output of each Heater will respectively contain the desired value.
Here you will find a brief example, which is now also included in the ZIP archive of the FlowHeater download .
TextFile Adapter : Convert an MS DOS ASCII CSV to a Windows ANSI flat file
In order to divide a string into pieces on a separator character, you need to make use of the Split Heater instead.
Drag and drop two copies of the Split Heater onto the Designer window. Connect the field that contains the postcode and town name to the inputs of both Heaters. Next configure the Heater settings as follows.
Postcode
Search: <space character>
Return column: 0
Town
Search: <space character>
Return column: 1
The output of each Heater will respectively contain the desired value.
Here you will find a brief example, which is now also included in the ZIP archive of the FlowHeater download .
TextFile Adapter : Convert an MS DOS ASCII CSV to a Windows ANSI flat file
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
Time to create page: 0.255 seconds