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)
February 17, 2011 8:04 PM
February 18, 2011 11:19 PM