>SELECT * FROM mytable where; > f1 in (SELECT f1 from look_up group by f1 having count(*) = 1) AND ; > f2 in (select f2 from look_up group by f2 having count(*) = 1) >>
>update mytable set flag = "1" where; > f1 in (SELECT f1 from look_up group by f1 having count(*) = 1) AND ; > f2 in (select f2 from look_up group by f2 having count(*) = 1) >And you are very sure that the SELECT returns correct record but UPDATE didn't update all of them?
update mytable set flag = "1"; FROM mytable; where f1 in (SELECT f1 from look_up group by f1 having count(*) = 1) AND ; f2 in (select f2 from look_up group by f2 having count(*) = 1)