結果 : loop through a select statement in sql server