tag:blogger.com,1999:blog-7998687752365941655.post7178457804187127943..comments2022-03-25T16:46:26.176+05:30Comments on VM Blogs: Get the Nth positioned string from a delimited listVisakh Murukesanhttp://www.blogger.com/profile/02874515877085669105noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7998687752365941655.post-231923436768769762013-05-25T12:30:49.452+05:302013-05-25T12:30:49.452+05:30Yep agree that XML special string can blow it up. ...Yep agree that XML special string can blow it up. But for that you can prepare string beforehand to avoid the characters if possible.<br />I couldnt find a drastic change in performance in my case. <br />Definitely Tally table is better method but in my case the OP wanted a method to be use inline within same statement.Visakh Murukesanhttps://www.blogger.com/profile/02874515877085669105noreply@blogger.comtag:blogger.com,1999:blog-7998687752365941655.post-23763557373699529012013-05-24T01:08:36.028+05:302013-05-24T01:08:36.028+05:30Using XML for this can lead to very poor performan...Using XML for this can lead to very poor performance (lots of overhead and memory use, even for a simple small string). XML parsing like that can also blow up if the string contains "xml-special" characters.<br /><br />Here is a MUCH better way to split strings: http://www.sqlservercentral.com/articles/Tally+Table/72993/<br /><br />And if you have few elements or want one of the early ones in a many-delimited string, this is great too:<br /><br />http://www.sqlservercentral.com/articles/T-SQL/97545/<br /><br />Kevin G. Boles<br />SQL Server Consultant<br />SQL Server MVP 2007-2012<br />Indicium Resources, Inc.<br />TheSQLGuruhttps://www.blogger.com/profile/09262245741634070658noreply@blogger.com