Extract substring

AlanKempster

New member
Local time
Today, 13:46
Joined
Jul 9, 2001
Messages
3
I have a table in which one field badly needs separating into two. Currently, it is laid out as a mixed case text string followed by an upper case text string, e.g. O little town of Bethlehem FOREST GREEN.

I need to move the upper case string (FOREST GREEN) to a new field (and then trim the original field accordingly). Since there is no delimiter between the two parts of the field, I have no idea how to proceed. Can anyone help?

Thanks.
 
You need to make a procedure to step through each letter in the string and seperate the Capitalized and lowercase letters into two seperate fields.
 
To add to Keith's reply you would need to start from the right hand end of the string and step left to find the first lowercase letter, of course if the strings can contain other than letters then the problems are increased.

Functions such as Len, Mid will be used initially then Right and Left to do the separation.

Brian
 

Users who are viewing this thread

Back
Top Bottom