January 13, 2009 at 7:24 am
Jeff Moden (1/13/2009)
Mark,VERY clever code... I obviously never thought of using PatIndex and a variable for the first character of a range... And, it's about twice as fast as the Tally table method.
The very cool part is that it's twice as fast as that if you take it out of the UDF and use the code inline.
Thanks for the feedback, much appreciated.
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537January 13, 2009 at 11:05 pm
Mark,
My apologies. When I ran your code I had declared the existing string parameter as char instead of varchar. The code works great!
Thanks again.
S Ely
January 13, 2009 at 11:08 pm
Sorry for the name gaff Jeff,
I must be getting old ....
Cheers!
Sergei
January 13, 2009 at 11:42 pm
Nice one Mark...
Rarely see someone outdo Jeff ....:)
"Keep Trying"
January 14, 2009 at 2:27 am
Sergei Ely (1/13/2009)
Sorry for the name gaff Jeff,I must be getting old ....
Cheers!
Sergei
No problem, Sergei... that's the whole idea, isn't get? Get older? 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
January 14, 2009 at 2:28 am
Chirag (1/13/2009)
Nice one Mark...Rarely see someone outdo Jeff ....:)
... and Mark knocked this one out of the park! 🙂 Nicely done, Mark.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply