条码扫描.sql 518 B

12345678910111213
  1. create view [dbo].[OrderItems] as select
  2. dindan.id, -- 订单号;
  3. dindansp.autoid, -- 商品自增;
  4. shangpin.spid, -- 商品id;
  5. shangpin.spname, -- 商品名;
  6. shangpin.splb, -- 商品类别;
  7. dindansp.status1, -- 单个商品完成状态;
  8. dindansp.status2, -- 单个商品取件状态;
  9. dindansp.shuliang, -- 商品数量;
  10. dindansp.BackItemsCot, -- 完成数量;
  11. dindansp.PickupItemsCot -- 取件数量;
  12. from (dindan inner join dindansp on dindan.id = dindansp.id) inner join shangpin on dindansp.name = shangpin.spname
  13. where dindan.status3 <> 'OK'