pruthvi116 (2/13/2014)
Thanks for both the functions!! Both of them were extremely useful.
My recommendation would be to avoid any and all functions, especially split functions, that contain the words "WHILE" or "BEGIN". That would make them either Scalar or Multi-Statement functions that will rob your application of performance and use way more resources than they ever should.
Please see the following article for a demonstration of exactly what I'm talking about.
http://www.sqlservercentral.com/articles/T-SQL/91724/
--Jeff Moden
Change is inevitable... Change for the better is not.