...subscribers only. Subscribe now and access to every SQL Server Magazine article ever written! If performance is your maingoal, you should use the set-based solution only with very small partition sizes; otherwise, you should use the CLR...
http://www.sqlmag.com/