結果 : how to replace cursor in sql server