Jaspal Singh
Mega Patron

I would simplfy it as below.

var UpdGr = new GlideRecord('x_billable_invoice_details');
UpdGr.addQuery('number','MBD0001021');
UpdGr.addQuery('vat_id','>',1);
UpdGr.query();
while(UpdGr.next())
{
UpdGr.type='billable';
UpdGr.update();
}