結果 : sql server replace cursor with while loop