--升级领料上限数量历史数据
IF EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY_A' AND KSQL_COL_NAME ='FEXTRARATIOQTY') 
UPDATE T_POM_MANUSTOCKENTRY_A A SET FEXTRARATIOQTY=(SELECT FDEMANDQTY FROM T_POM_MANUSTOCKENTRY B WHERE A.FENTRYID=B.FENTRYID AND A.FDETAILID=B.FDETAILID)	WHERE A.FISSINHIGHLIMIT=0 AND A.FEXTRARATIOQTY=0;	
		
		
		
