SELECT uniqueid, sku, OperatorID, qty, forecast_month,forecast_year FROM tbl_IMPORT_SalesDealData_1stQtr2007 WHERE operatorid != 0 AND uploadedYN = 0 SELECT forecast_status, forecast_qty FROM tbl_MFR_TPF_Detail WHERE MFR_ID = 1 AND tpartnerID = AND tpartnerType = 'OPR' AND productItemCode = AND productLevel = 'SKU' AND forecast_year = '#select.forecast_year#' AND forecast_month = '#select.forecast_month#' AND forecast_status != 'FPB'
---> INSERT INTO tbl_MFR_TPF_Detail(MFR_ID,tpartnerID,tpartnerType,productItemCode,productLevel, forecast_year,forecast_month,forecast_qty,forecast_status, lastupdate,sourceofupdate) VALUES(, , , , , , , , , #CreateODBCDateTime(Now())#, 'XCEL')
---> UPDATE tbl_MFR_TPF_Detail SET forecast_qty = , forecast_status= , lastupdate = #CreateODBCDateTime(Now())#, sourceofupdate = 'XCEL' WHERE MFR_ID = 1 AND tpartnerID = AND tpartnerType = 'OPR' AND productItemCode = AND productLevel = 'SKU' AND forecast_year = '#select.forecast_year#' AND forecast_month = '#select.forecast_month#' AND forecast_status IN ('FEB','A') #select.uniqueid#::#select.sku#::#check.recordcount#::#check.forecast_status# || #check.forecast_qty#::#variables.forecast_qty#::Month=::OPR=#val(select.OperatorID)#
UPDATE tbl_IMPORT_SalesDealData_1stQtr2007 SET uploadedYN = 1 WHERE uniqueid = #select.uniqueid#
---> UPDATE tbl_IMPORT_SalesDealData_1stQtr2007 SET summaryUpdated = 1 WHERE OperatorID IN (#valuelist(select.OperatorID)#) --->