Your LTrims are doing no good because you aren't doing anything with that end of the string. So if you're expecting the last token to have no spaces surrounding it, you need to change your expression. (Try 'test1- color' with your expression and see what happens.)
I prefer to avoid parsename because it performs so badly. Plus, we don't know that it will always be the 4th token--the rules could change. Parsename won't go to a 5th token.
What do you mean that it "performs so badly"? Performance wise?
--Jeff Moden
-------------------------------------------------------------------------------
"RBAR" is pronounced "ree-bar" and is a "Modenism" for "Row By Agonizing Row
Hmmm I'm not sure why I had that impression that it performs badly. I guess I was basing that on previous peeks into system stored procedures that people use for shortcuts, which in fact are not well written. But this is a function and I have no idea how it's implemented internally. I'd be interested in some performance tests between the 2 methods given above, but I don't have time to do it right now.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.