Run one update query for each record