I am trying to update some fields based on their occurence. If they only occur one time, I am updating some status field.
My current code is as follows:
Use IN keyword instead of equals operator like so:
IN
UPDATE table1 SET statusField = 1 WHERE someID IN ( SELECT someID FROM table1 GROUP BY someID HAVING COUNT(*) = 1 )
Using = requires that exactly 1 result is returned by the subquery. IN keyword works on a list.
=