• jdfletchr (10/26/2012)


    Try the Parsename function. Not what is was made for, but works quite well for what you need and is much faster that CharIndex and Len.

    Did you read the thread with the tests made and the observation on a solultion that was the same as yours?

    Without an extra condition, your PARSENAME solution will throw incorrect results.

    By the way, another problem is we're dealing with an ntext column.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2