Hi,
I was to update a table based on a join with the existing table.
UPDATE OPT_SalesForecastDetail det, OPT_TmpSalesForecast tmp
SET det.SFDT_QtyMonth1=tmp.TMSF_QtyMonth1,
det.SFDT_QtyMonth2=tmp.TMSF_QtyMonth2,
det.SFDT_QtyMonth3=tmp.TMSF_QtyMonth3,
det.SFDT_VendRemarks= tmp.TMSF_VendRemarks,
det.SFDT_VersionNo=SFDT_VersionNo+1
WHERE det.SFDT_SalesPlanCode='SF012005GEN0031'
AND tmp.TMSF_PackCode = det.SFDT_PackCode
AND (tmp.TMSF_QtyMonth1 <> det.SFDT_QtyMonth1
OR tmp.TMSF_QtyMonth2 <> det.SFDT_QtyMonth2
OR tmp.TMSF_QtyMonth3 <> det.SFDT_QtyMonth3
OR det.SFDT_VendRemarks <> tmp.TMSF_VendRemarks)
This does not work please give ur comments