Got it to work this way finally (and after pulling most of my hair out)
UPDATE B
SET status = "CLS"
WHERE ORDERNO IN
(SELECT b.ORDERNO
FROM A a, B b
WHERE a.ORDERNO = b.ORDERNO)
I have two tables, A and B. I am trying to update a status field to, "CLS" only if there are two matching rows found between A and B.. I am stuck trying to do this in DB2.
I have tried,
UPDATE B
SET status = "CLS"
WHERE ORDERNO =
(SELECT b.ORDERNO
FROM A a, B b...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.