可以合成两步来做update ExportItm set Status=8 Where MCustNo='" + CurMainCustNo + "' And ExpNo='" + CurExportNo + "' And ExpNoID=" + xID + " And ExpType='" & CurExpType & "' And Status=0update Export set Status=8 Where MCustNo='" + xMCustNo + "' And ExpType='" + xExportType + "' And ExpNo='" + xExportNo + "' And Status=0 Where Not Exists(select 1 from ExportItm Where MCustNo='" + xMCustNo + "' And ExpType='" + xExportType + "' And ExpNo='" + xExportNo + "' And Status<>8)
表示是否存在記錄,不是筆誤,完全正確。
显然是笔误 select * from ExportItm
------------------------------------
错误,这不是笔误,是故意这么写的。