loop never ends in sql server using While Exists : [Question is in the image][1]


  [1]: http://i.stack.imgur.com/0Gdd7.jpg


I was unable to post the code so had to put it in the form of image.  Thanks