UPDATE GSM_LOT A SET ( A.LOT_FLAG, A.ACTION_DATE ) = (SELECT 'O', CASE WHEN COL1 IN('0') THEN A.ACTION_DATE WHEN COL1 ='1' THEN DECODE(A.ACTION_DATE, NULL, SYSDATE, A.ACTION_DATE) ELSE SYSDATE+1 END ACTION_DATE FROM DUAL ) WHERE A.SLIP_NO='ABC';
UPDATE GSM_LOT A SET ( A.LOT_FLAG, A.ACTION_DATE ) = (SELECT 'O', CASE WHEN COL1 IN('0') THEN A.ACTION_DATE WHEN COL1 ='1' THEN DECODE(A.ACTION_DATE, NULL, SYSDATE, A.ACTION_DATE) ELSE SYSDATE+1 END ACTION_DATE FROM DUAL ) WHERE A.SLIP_NO='ABC';
转载于:https://www.cnblogs.com/wangxinbo/p/11219100.html