mysql - SQL update that seems to require GROUP BY -
i have update i'd make table, like
update mytable left join worker on first=worker_first_name && last=worker_last_name group concat(first, '%%', last) set taint = count(pkey) > 1;
but of course table_reference in update not allow group bys. how can set column? it's checking if first/last name combination occurs @ once in other table.
update mytable inner join ( select first, last, count(pkey) > 1 result mytable left join worker on first=worker_first_name , last=worker_last_name group first, last) other on other.first = mytable.first , other.last = mytable.last set taint = other.result;
Comments
Post a Comment