I have a select statement that gives me the results I need for my update but I have no idea how to incorporate it into the update. Below is the select statement and the results.
select top 20 percent
fpartno
,(fytdiss * fmatlcost) as 'total'
from inmast
where fpartno not like 'CRV%'
and fcstscode = 'A'
group by fpartno, fytdiss,fmatlcost,fabccode
order by total desc
fpartno total
---------------------------------------------------
1062-20-0244 172821.4800000000
B50602 91600.7205800000
BM6031PQ 82978.3200000000
LY2F-DC12 74740.9500000000
BM6033SQ 51640.4200000000
DTM06-6S-E007 49810.4700000000
My update looks like this
update inmast
set fabccode = 'A'
I'm guessing my select would some how go into the where clause but I'm not sure how.
fabccode
to'A'
for all the rows from your resultset?