I am not really sure what you are asking for, but I will make a guess. I gather you have one long text field that contains the full name. I also guess that you are trying to parse through it to be able to print last name first, etc, or to break it up into individual fields. <br><br>Using a numeric variable as a pointer and the INSTR and SUBSTR functions, you could walk through the text field backwards and break the information up. I am not sure what flavor of SQL you are using, so I will try to explain using pseudo-code (does anyone use that any more?) and Oracle SQL.<br><br>Say we have the following string that we want to parse - "Billy Joe Bob Red-Neck" <br><br>ASSUMPTIONS -<br>- All names will have a value (Not Null). <br>- All names will be entered first, middle, and then last.<br>- Any double last names (due to marriage?) will be separated by a "-" not a space.<br>- There are no Titles, like "Dr." and no extensions like "Jr." If you must handle those, it might be easier to make a list of the most common titles and extensions, search for them first, and then remove them from the rest of the name string.<br><br><b><br>/* Declare and Initialize Name Strings */<br>long_name varchar2 "Billy Joe Bob Red-Neck"<br>last_name varchar2 ""<br>first_name varchar2 ""<br>middle_name varchar2 ""<br><br>/* Declare Variables */<br>space_ptr Number<br><br>/* Make sure there are no leading or trailing spaces */<br>long_name = LTRIM(RTRIM(long_name))<br><br>/* Get Last Name */<br><br>/* Starting from the end of the string, look for the */ <br>/* first space */<br>space_ptr = INSTR(long_name, " ", (LENGTH(long_name) * -1))<br><br>/* The last name is the charcters from the next position */<br>/* after the last space to the end of the string */<br>last_name = SUBSTR(long_name, space_ptr + 1)<br><br>/* Remove last name from long name */<br>long_name = SUBSTR(long_name, 1, (LENGTH(long_name) - (LENGTH(last_name) + 1))<br><br>/* Get Middle Name */<br><br>/* Starting from the end of the string, look for the */<br>/* first space */<br>space_ptr = INSTR(long_name, " ", (LENGTH(long_name) * -1))<br><br>/* The middle name is the charcters from the next */<br>/* position after the last space to the end of the */<br>/* string */<br>middle_name = SUBSTR(long_name, space_ptr + 1)<br><br>long_name = SUBSTR(long_name, 1, (LENGTH(long_name) - (LENGTH(middle_name) + 1))<br><br>/* All that is left must be the First Name */<br>first_name = long_name<br></b><br><br>Like I said, I am not sure if this is what you were asking or not. I hope it helps...<br> <p>Terry M. Hoey<br><a href=mailto:th3856@txmail.sbc.com>th3856@txmail.sbc.com</a><br><a href= > </a><br>