SQL Modify question
- by Jeff
I need to replace a lot of values for a Table in SQL if the inactivity is greater then 30 days.
I have
UPDATE VERSION SET isActive = 0
WHERE customerNo =
(
SELECT c.VersionNo
FROM Activity b
INNER JOIN VERSION c ON b.VersionNo = c.VersionNo
WHERE (Months_between(sysdate, b.Activitye) > 30)
);
It only works for one value though, if there is more then one returned it fails. What am I missing here?
If someone could educate me on what is going on, I'd also appreciate it.