You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/DB/sqlserver/处理出库计划建立后执行货转的业务.sql

28 lines
1.1 KiB
SQL

select * from op_wms where CNTRNO='HLXU5192269'
ABEB8A5D-255D-4164-AAD1-980797550DAF
select * from OP_WMS_OUT_PLAN_DETAIL where mblno='HLCUBSC2004BNVO4'
order by cntrno
select * from OP_WMS_OUT_PLAN_DETAIL where CNTRNO='HLXU5192269'
-- CNTRNO='HLXU5192269'
select * from OP_WMS_OUT_PLAN_DETAIL where WMSPLANID='5A4F0303-433E-47A3-8FC9-136FCA4A546A'
select * from op_wms where mblno='HLCUBSC2004BNVO4' and kgs>0 order by cntrno
update OP_WMS_OUT_PLAN_DETAIL set wmsid=(
select wmsid from op_wms where mblno='HLCUBSC2004BNVO4' and kgs>0 and CNTRNO=OP_WMS_OUT_PLAN_DETAIL.CNTRNO
)where WMSPLANID='5A4F0303-433E-47A3-8FC9-136FCA4A546A'
select * from OP_WMS_OUT_DO_GOODS where WMSPLANDETAILID in(select WMSOUTDETAILID from OP_WMS_OUT_PLAN_DETAIL where WMSPLANID='5A4F0303-433E-47A3-8FC9-136FCA4A546A'
)
update OP_WMS_OUT_DO_GOODS set wmsid=(select wmsid from OP_WMS_OUT_PLAN_DETAIL where WMSPLANID='5A4F0303-433E-47A3-8FC9-136FCA4A546A' and CNTRNO=OP_WMS_OUT_DO_GOODS.CNTRNO)
where WMSPLANDETAILID in(select WMSOUTDETAILID from OP_WMS_OUT_PLAN_DETAIL where WMSPLANID='5A4F0303-433E-47A3-8FC9-136FCA4A546A'
)