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