标签:account war exist rom exists count key for form
UPDATE ( SELECT w.FORM_NO,wp.CF02,wp.LINE_ITEM_NO,wp.STATUS FROM T_WAREHOUS_PRICE w , T_WAREHOUS_PRICE_DTL wp WHERE w.ID = wp.REF_KEY AND wp.IS_DO_PRICE = ‘是‘ AND w.SEND_CODE IN (SELECT DISTINCT SEND_CODE FROM T_ACCOUNT WHERE status=‘99‘) AND wp.STATUS <> ‘99‘ AND exists( SELECT 1 FROM T_ACCOUNT a , T_ACCOUNT_DTL ad WHERE a.ID = ad.REF_KEY AND a.STATUS <> ‘99‘ AND w.FORM_NO = ad.WAREHOUSE_NO AND wp.LINE_ITEM_NO = ad.CF02 ) ORDER BY w.FORM_NO ASC , TO_NUMBER(wp.CF02) ) SET STATUS = ‘2‘;
标签:account war exist rom exists count key for form
原文地址:https://www.cnblogs.com/cxw-cm/p/11731062.html