Beginner...update stmt.
Posted in 2000
Hi, I was wondering if someone might critique this statement (see
below). I wouldn't expect that it should take over 5 hrs to run and
still not complete executing???? Any assistance you can offer I will
greatly appreciate it. Thanks.
---FYI--- I'm expecting to update about 3 million rows. The idea is to
get the distinct col(s) from tables Step1 and upc_rslts_fcst and use
them against compare_forecast (52 recs for each upc...)
UPDATE compare_forecast SET compare_forecast.New_A12 = (selectStep1.sumofregunits * upc_rslts_fcst.New_R_PCT
from upc_rslts_fcst, Step1 WHERE compare_forecast.upc = Step1.upc and
upc_rslts_fcst.upc = Step1.upc and compare_forecast.district =
upc_rslts_fcst.district and compare_forecast.location = Step1.location
and
compare_forecast.week = Step1.week and Step1.week = upc_rslts_fcst. week
);