結果 : while loop instead of cursor in sql server