TitleistDBA
IS-IT--Management
I have the following query that I need to turn into an update to set the oh.OAMODL field to 'USM'
select oh.oaorno, sum(OBORQA) as totqt
from MVXCJDTTST.oohead oh, MVXCJDTTST.ooline oo, MVXCJDTTST.mitmas m
where oh.OAMODL='RSG'
and oh.oaorst < '44'
and oo.obitno=mmitno
and oh.oaorno = oo.oborno
and m.mmitcl='2200'
group by oh.oaorno
The problem is I only want to update the records where the 'totqt' value is > 6.
Can anyone help with this.
Thanks
select oh.oaorno, sum(OBORQA) as totqt
from MVXCJDTTST.oohead oh, MVXCJDTTST.ooline oo, MVXCJDTTST.mitmas m
where oh.OAMODL='RSG'
and oh.oaorst < '44'
and oo.obitno=mmitno
and oh.oaorno = oo.oborno
and m.mmitcl='2200'
group by oh.oaorno
The problem is I only want to update the records where the 'totqt' value is > 6.
Can anyone help with this.
Thanks