help please...split text into multiple columns

edp1959

Registered User.
Local time
Today, 07:29
Joined
Aug 24, 2003
Messages
23
Can someone help with code to split this text field in my table into multiple columns? I want to do this in my database without having to export to Excel. The word seperator would be a space. Thanks
 

Attachments

Have a look at the various available text manipulation functions. You will need to use Instr() to locate your Spaces, Left() to return text to the left of the space and Len() to determine the length of the string.

You wont be able to do this in one hit but will need to loop through the text stripping off the word to the left of the space until you arrive and a string with no spaces in it.
 
Big issue here is that from what I can see certain fields can have spaces in them, therefore you cannot use the Split() function to seperate them with spaces. I would look back to the originator of the text file and get them to use a different delimiter to differetiate between fields. maybe a Tab or a comma or even a Pipe | symbol. In other words something that will not appear in a field.
 

Users who are viewing this thread

Back
Top Bottom