I am trying to update a table and use a subquery for the argument. I think I have both queries correct but since but since they are from two tables I am not tying together correctly. Can you tell me what I need to do?
update MVXJDTA.MITMAS set MMSTAT ='01' where MVXJDTA.MITMAS.MMITNO = MVXJDTA.MITSTA.MHITNO (Select MHITNO as Item, SUM(MHMAQT+MHPUQT + MHSOQT + MHUSQT + MHDEMQ)as total from MVXJDTA.MITSTA where MHCYP6 Between 200801 and 201102 Group by MHITNO Having SUM(MHMAQT+MHPUQT + MHSOQT + MHUSQT + MHDEMQ) <= 0)
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!