Just for the record Kingston's suggestion works fine n'all
Actually, it doesn't. It works as long as the last three characters aren't repeated anywhere else in the string, but will not work if the characters are repeated. For example, if the original string is "CH*012*01", Kingston's solution will produce "CH2" whereas the correct solution is "CH*012'
J. Drew Allen
Business Intelligence Analyst
How to post data/code on a forum to get the best help.How to Post Performance Problems
Make sure that you include code in the appropriate IFCode tags, e.g. [code=sql]<your code here>[/code]. You can find the IFCode tags under the INSERT
options when you are writing a post.