这是更新选项中的SQL语句
DELETE FROM MM_INOUTITEMS
WHERE (( PKID = :OLD__PKID ) or ((PKID is null) and (:OLD__PKID is null)))
AND (( BillID = :OLD__BillID ) or ((BillID is null) and (:OLD__BillID is null)))
AND (( InnerID = :OLD__InnerID ) or ((InnerID is null) and (:OLD__InnerID is null)))
AND (( MaterialID = :OLD__MaterialID ) or ((MaterialID is null) and (:OLD__MaterialID is null)))
AND (( Memo = :OLD__Memo ) or ((Memo is null) and (:OLD__Memo is null)))
AND (( SourceID = :OLD__SourceID ) or ((SourceID is null) and (:OLD__SourceID is null)))
AND (( WarehouseID = :OLD__WarehouseID ) or ((WarehouseID is null) and (:OLD__WarehouseID is null)))
AND (( Flag = :OLD__Flag ) or ((Flag is null) and (:OLD__Flag is null)))
AND (( BillType = :OLD__BillType ) or ((BillType is null) and (:OLD__BillType is null)))
AND (( InOrOut = :OLD__InOrOut ) or ((InOrOut is null) and (:OLD__InOrOut is null)))
AND (( SourcePK = :OLD__SourcePK ) or ((SourcePK is null) and (:OLD__SourcePK is null)))
AND (( Status = :OLD__Status ) or ((Status is null) and (:OLD__Status is null)))
和
UPDATE MM_INOUTITEMS
SET PKID = KID ,
BillID = :BillID ,
InnerID = :InnerID ,
MaterialID = :MaterialID ,
StandardPrice = :StandardPrice ,
ActualPrice = :ActualPrice ,
InCounts = :InCounts ,
StandardInMoney = :StandardInMoney ,
ActualInMoney = :ActualInMoney ,
OutCounts = :OutCounts ,
StandardOutMoney = :StandardOutMoney ,
ActualOutMoney = :ActualOutMoney ,
Memo = :Memo ,
SourceID = :SourceID ,
WarehouseID = :WarehouseID ,
Flag = :Flag ,
BillType = :BillType ,
InOrOut = :InOrOut ,
TaxRate = :TaxRate ,
TaxMoney = :TaxMoney ,
TotalMoney = :TotalMoney ,
SourcePK = :SourcePK ,
Status = :Status
WHERE (( PKID = :OLD__PKID ) or ((PKID is null) and (:OLD__PKID is null)))
AND (( BillID = :OLD__BillID ) or ((BillID is null) and (:OLD__BillID is null)))
AND (( InnerID = :OLD__InnerID ) or ((InnerID is null) and (:OLD__InnerID is null)))
AND (( MaterialID = :OLD__MaterialID ) or ((MaterialID is null) and (:OLD__MaterialID is null)))
AND (( Memo = :OLD__Memo ) or ((Memo is null) and (:OLD__Memo is null)))
AND (( SourceID = :OLD__SourceID ) or ((SourceID is null) and (:OLD__SourceID is null)))
AND (( WarehouseID = :OLD__WarehouseID ) or ((WarehouseID is null) and
(:OLD__WarehouseID is null)))
AND (( Flag = :OLD__Flag ) or ((Flag is null) and (:OLD__Flag is null)))
AND (( BillType = :OLD__BillType ) or ((BillType is null) and (:OLD__BillType is null)))
AND (( InOrOut = :OLD__InOrOut ) or ((InOrOut is null) and (:OLD__InOrOut is null)))
AND (( SourcePK = :OLD__SourcePK ) or ((SourcePK is null) and (:OLD__SourcePK is null)))
AND (( Status = :OLD__Status ) or ((Status is null) and (:OLD__Status is null))) |