SQL Modify question

Posted by Jeff on Stack Overflow See other posts from Stack Overflow or by Jeff
Published on 2011-02-19T14:09:50Z Indexed on 2011/02/19 15:25 UTC
Read the original article Hit count: 154

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle