I've been looking for an answer to my problem but to no avail. The problem is as follows, when I try to update a value more than once on a single UPDATE statement in SQL it will always update once. Is as if the UPDATE statement is working over a copy of my table and always overwriting the value on the original table, hence the resulting table only has the value incremented by 1 and not by the number of times the value was set with value=value+1.
Here's an example:
UPDATE Home, Person
SET Home.NumberOfChilds=Home.NumberOfChilds+1
WHERE Home.State= Person.State
AND Home.ZoneCode = Person.ZoneCode
AND Home.Address = Person.Address
AND Person.IsChild = true;
In this case, if a home has 3 childs the resulting amount of children would be 1 on that home, when I need it to be 3. Thanks in advance.