I have two tables: exam has fields : code,obt01. hwsv has fields:code, perc e.g code perc 1 100 2 89 3 70 ..... i want to update exam field obt01 with hwsv filed is perc. like this. if perc is 100 replace exam field with 10 if perc is 80 to 99 replace exam field with 9 if perc is 70 to 89 replace exam field with 8 ............