Just worth noting, a while loop is just as much a cursor as an explicitly defined cursor. It just doesn't have the keyword. It's still a loop, it's still processing a row at a time, it's still slow.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability