• UPDATE sf

    set JUL_SAL = isnull(sf.JUL_SAL,0) + isnull(ss.SLS_DOL,0)

    FROM

    DIAPLUSDB.dbo.SalesForecast sf

    left join (

    SELECT CSCODE, PLT_NO, SUM(SLS_DOL) AS Total_SLS_DOL

    FROM SALES_SUMMARY

    WHERE PPPERIOD = '201207' and SLS_DOL is not null

    ) ss on ss.CSCODE = sf.CustID and ss.PLT_NO = sf.PlantID

    I'm not sure why do you need LEFT JOIN here.

    If there are not corresponding records in SALES_SUMMARY the query will add 0 to JUL_SAL, leaving the value in there unchanged, but adding an overhead of a useless update.

    Considering you WHERE clause effectively forced INNER JOIN anyway, I'd made it explicit.

    _____________
    Code for TallyGenerator