For each loop to Update a Field

For each loop to Update a Field

Hi,
I have a Report which have about 6,000 rows of data. Today I have added a new drop down field ( "Yes", "No") . 
So Now I want to update all records to "Yes". I know I can use Bulk edit to update the field. But I would like to create a custom function that will update in a single click. Below script I was trying but it is not working .

void Test.AprovedToYes()
{
    for each rec in MVPD_Subscriber_Calculation
    {
        rec.MD_Approved = "Yes";
    }
}


Can anyone please help me 

Arfater.