update table1 a
set id1 =
(select uuid
from table2
where to_number(a.id2) = to_number(id2)
and rownum = 1)
where (no1, decode(no2, '', 'A', no2)) in
(select a.no1, decode(a.no2, '', 'A', a.no2) from table3 a);
set id1 =
(select uuid
from table2
where to_number(a.id2) = to_number(id2)
and rownum = 1)
where (no1, decode(no2, '', 'A', no2)) in
(select a.no1, decode(a.no2, '', 'A', a.no2) from table3 a);